We don’t teach real-world programming here

So, yesterday I went to Java class again. This time very much curious to see how others handled their homework. No big surprises there: a couple of people got the basics done, most got them horribly wrong with regards to a sane design.

I threw in a couple of weighted opinions about how things should be done, along with some API hints.

Near the end, I asserted that you should be able to make pretty much every local variable except loop counters final and still have the program compile. Even the teacher was stunned. I explained that in the hands of beginners, mutable variables can easily lead to nasty crap like Object temp being assigned to four times in a single method, and good luck trying to figure that one out.

And the teacher said: “we don’t teach real-world programming here. We deal with ideal conditions only.” Fair enough, but we’re not dealing with ideal programmers, we’re dealing with a bunch of wet-behind-the-ears newbies that are actually there to learn real-world Java. Claiming that we deal with ideal conditions only is a cheap cop-out, especially when I wasn’t demanding the students to refactor a 400-line method that uses instance variables for temporary state. I was just pleading that they don’t write the mess to begin with!


We’re all doomed, I say.

Leave a Reply

Your email address will not be published. Required fields are marked *