I have a friend who is taking a first-year computer science course. She’s come into this course without any programming knowledge. Her school requires her, for her degree, to take a number of introductory courses for various science disciplines — she isn’t going to take another computer science course after this one.

This introductory comp sci course teaches Java. Java, as you probably know, is a language in which the canonical “Hello, world!” program takes seven lines of code and requires you to invoke the following concepts:

  • Classes
  • Static methods
  • Command-line arguments
  • Visibility

None of which, you may notice, have anything to do with writing “Hello, world!” on the screen.

Now, this need not be an inherently insurmountable stumbling block — I wouldn’t go so far as to say that it is impossible to effectively teach programming in such an environment. But I did see one of her practice midterms. It tested her on the following concepts:

  • Conversion rules from double to int
  • Filling in the correct types for the methods in some class
  • What happens when two variables point at the same object
  • Writing code to perform some calculation
  • Filling in methods that mutate some object
  • What kinds of methods take “an implicit parameter” (which after some Googling, I determined meant the “this” pointer)
  • Calling some methods on an object whose API was defined in two brief comments

There was no mention of the following concepts:

  • If statements
  • Loops

I talked to her again after she had taken her midterm. She’s learning about the if statement now. She’s also, at the same time, learning how to make UML class diagrams. She says that they talk in class about how they’re preparing her for work in big companies.

Man, I’ll say.

Is this not self-evidently ludicrous to anyone else? Does it ever occur to anyone that the way to
teach programming is not first to hope that they already know enough to get by, and then indoctrinate them into the cult of OO before they learn how to actually make the computer do anything? How is this better than learning Pascal? ARGH.

One Response to “”

  1. Bem said:

    Oct 17, 07 at 11:34 am

    That makes me sad. Talk about how to prove to people that programming is boring and totally not any fun. *sigh*

    I really think everyone that wants to teach programming should look at what why’s doing. And check out Hackety Hack. Now that’s how you teach programming.


Leave a Reply