Mail sent to Joel in response to this:


I’ve been through this myself. Back in the mid-80’s I got a degree in Applied Statistics and Computing. There was an awful lot of numerical maths and heavy statistics as well as a firm grounding in structured programming. We were taught using Pascal, which did have pointers but nowhere near as bare bones as C. The year I left they took out a lot of the maths because people were whining – what did they think the course was going to be about with a title like that? Knitting?  I wish I had done a proper compsci course, all of my knowledge has come from reading books on compiler design and how to write better C, I bet none of these books are in print any more. Same with database design – no-one in the current crop can design a database properly or write SQL that gets data from more than one table without major brain surgery, the Java crew just use raw tables without proper relationships and then look on in surprise when their databases are full of junk orphaned data because of an application crash in the middle of a transaction (no, they don’t understand transactions either).

This stuff has been driving me mad for ages. One of the things you didn’t mention (maybe indirectly because of the sanitising of J2EE) is that Java generates an awful lot of frameworks. It drives me nuts trying to get anything done – each has another acronym and XML file, each is independent of the others, and each is useless, and each is embedded in every IDE you can use with no proper explanation of what the hell it adds to the mix.

I recently switched to PHP to get a personal project done from Java Struts. I got it done in about 2 weeks in the evenings and this included learning PHP and translating an XML config reader from Java.

Java is, in fact, too low level in many ways. Everything generic is type Object and then you have to screw around with it to work out what it really is. I’m currently studying for my EJB certification and it’s totally perverse. Badly-named packages with interfaces in different places, a query language for using entity objects together to construct queries (nasty and pointless), the list goes on.

I do think that in corporate terms Java is the new C, mainly because it’s become the language of assembling apps from other people’s components, and it’s also “safe”. I don’t like it any more, I did when it was new, but now it’s too clever (in the wrong sense) for its own good.

I agree totally about the int/Integer thing, as well as why they hell is there a char and a String? Why are there base types and then wrapper objects – why aren’t there just objects? Those objects can be implemented very efficiently with some syntactic sugar to make it easy but instead we have this deaf-mute child of C++ forced on us. The worst bits of C++ combined with the worst bits of Smalltalk. Why doesn’t the syntactic sugar around strings work for StringBuffer – which is the mutable version of String – lots of tiny objects in a large web app will start to fill the heap with loads of tiny thrown-away bits of strings. Using a mutable object could ameliorate this, but you’d have to have the insight to realise it and then rewrite all of the string manipulation using heavy-looking method calls, so no-one does.

My blog is on – don’t worry, I attack C as well but for different reasons.