Teaching the Children Well

Hans Muller (@author in JComponent, JLabel, JList, JScrollPane, JSpinner, JViewport) wrote a blog entry Teach the Children Well about how awkward it is to write and run your first Java program, compared to how BASIC was.

Good job the kid didn't want to use Jikes; until this weekend, you had to explicitly specify a bootclasspath. Ironic really, because Jikes' diagnostics are so much more readable for both beginner and expert, and make a real (and effective) effort to help you fix your problem, rather than just point out that there is one.

It's not that javac is serious competition for g++ in the appalling diagnostics stakes; it just isn't anything like as good as Jikes. Where Jikes is the helpful and pertinent assistant, javac is the strictly accurate but obscurantist professor. (Find your personality type by deciding which you prefer: "no such method" or "unresolved identifier"?)

As for g++, it's the barely comprehensible Glaswegian alcoholic, mumbling to itself in prolix fashion as it rolls about in the gutter. Pressed for an answer, all you'll get is "parse error, ye feckless gobshite ye!" before it vomits two hundred candidate operator<<s on your shoe.

Anyway, if you're running Jikes on some flavor of Unix, you should now be fixed. Apple users are fine, because we know where they keep their Java. Other Unix users will have to ensure $JAVA_HOME is set, and we'll collect the JAR files from $JAVA_HOME/jre/lib/.

So, if Hans has the sense to tell his son's friend to get a Mac, that's that. (And he can learn C++, Objective C, Python, and Ruby, too.)

There's another Jikes bug open and assigned to me that's fixed, but remains unclosed because as an aside in the bug comments, Chris Abbey suggested automatically appending .java if we look like we're being asked to compile something that doesn't end in .java.

Since all Java source files' names have to end in .java, this shouldn't cause trouble for anyone else. And it would have helped Hans' kid's friend. So I'm a little more convinced now that maybe it isn't such a bad idea.

I'm not convinced you aren't better off with a decent makefile, though. Start as you mean to go on. I had to learn make to build my C programs at that kid's age, and I'm still using make at twice that age.

Why shouldn't the kid have to learn about the command-line and the shell to learn to program? What happened to the people at university who resisted? Did they become good programmers? I submit that they did not. I further submit that I never knew a good programmer who didn't know and respect Unix, even if respect doesn't imply love.