Sun 10 Sep 2006

Java as a crutch for weak programmers

I often see Java compared to ‘more powerful’ languages — i.e., languages that allegedly allow expert programmers to do amazing things, but let bad programmers screw up*. The idea is that Java is the embodiment of a tradeoff: it stops you you making whole classes of errors at the expense of being unable to do whole classes of ‘expert’ things (for example, working with pointers, using higher-order functions, or any kind of macrology). Because of this it's a great languages for teams, where (it is suggested) not everyone can be an expert.

That's the story, anyway.

I read Dorothea Salo's blog. She has to program in Java as part of her job, and I'm sure she wouldn't disagree with me when I say she's not an expert programmer. Hell, I'll quote her:

Look. I am not a very good programmer. Let's just take that as read, okay?

I found it interesting, then, when her dislike of Java spilled out into precisely the above area of comparison:

Yeah, yeah, I said I hated Java. Well, I don’t any more.

I LOATHE THIS LANGUAGE WITH A PASSION THAT BLAZES UNCONTROLLABLY.

Oh my $DEITY, how many more things could they have designed into this language that make it easy for me to screw things up? Interfaces, decorator classes on every little freakin’ thing (the gyrations necessary to get a string out of a file have to be seen to be believed), wrappers all over hell’s half-acre ($DEITY forbid I just not give a damn what kind of number I’m seeing at any given time…), special rules for primitives (… or whether it’s an object or not…), Stupid Exception Tricks…

Look. I am not a very good programmer. Let’s just take that as read, okay? I screw things up enough all by myself. I want a language that lets me get stuff done in spite of my well-known tendency to screw things up, and gets out of my way otherwise.

Sorry for the heavy quoting, but it makes the point, no?

So: Dorothea has to jump through hoops to process files, and still makes errors. I, meanwhile, can't do any of the elegant tricks that I'm used to from Lisp, and feel terribly restricted (not to mention having whole regions of solution spaces off-limits to me because of missing features)**.

Given that the only remaining advantage of Java — its massive library support — seems mainly to counterbalance the fact that implementing those libraries yourself in Java would be a huge amount of effort, I need reminding: what's the point of Java again?

*Languages I've heard in this category are Lisp, C, Haskell, and other functional languages. C, of course, is low-level, but it's powerful in its own way. C++ I would be disinclined to include — any language that has whole reference shelves devoted to not screwing up simple things is really not to be recommended.

** I'm not saying that I'm an expert programmer, but I'm probably not a code monkey. In fact, if I were a bad programmer, it would probably only strengthen my point, no?


Posted at 2006-09-10 19:52:00 by RichardLink to Java as a crutch f…
Comments, trackbacks.

Update

Miscellany:Camping: Chelsea, Shaun, Elaina, and I went camping at Henry W. Coe State Park this weekend. It was awesome, with the following notables:
  • Hammering tent pegs into rock-like ground with a lug wrench. There are better tools for the job, I'm sure.
  • Fighting off raccoons. Shine a torch away from the fire, and see their little glowing eyes watching from the woods. Chitter, chitter. They spent the night attempting to open the cooler, biting into packets of mosquito repellent, and leaving muddy pawprints on the cars. I have a photo of the single muddy racoon handprint on my C-cell Mag. Cute little buggers.
  • Sometime after midnight the racoons went completely silent, then legged it. I suspect it had something to do with the strange animalistic sound we could hear. Boar? Mountain lion? Either was possible, according to the rangers.
  • Breakfast at 7:30, surrounded by the morning fog. As the sunshine burned off the fog, the bluejays came out, flying around, posing, and screeching. One of them was doing a superb hawk impression, and there were turkey vultures circling high up. Later on the ground squirrels poked their heads out of their burrows. No sign of the raccoons; I was very tempted to go and bang things around outside their burrows while they were sleeping.
  • Hiking at lunchtime on Saturday: we saw wild turkey, more birds, a blue lizard, three deer, and lots of beautiful scenery. There were a huge number of manzanita, aka madrone. The wood is very hard, and the trunk is startlingly cold (I'm told it's known as the “refrigerator tree”).
  • No hike is complete without an injury, of course (at least, mine aren't!). While removing the pit from an avocado, of all things, I got bitten by my Spyderco Delica 4. The damn thing is so sharp that it cut straight through the pit and into my hand. I got a nice gash out of it — scalpel-clean, and I could see a blood vessel inside the wound, but there was only a single bead of blood and no pain. I cleaned, compressed, and elevated, ate lunch, and hiked the 3.5 miles back to camp. It seems fine today. I'm very fortunate that it was that knife — the blade geometries of any of my other knives would have caused vastly more damage.
  • I'd bought a couple of Nite-Ize conversions for my two Maglites, and I'm pleased to say they performed well. The C-cell one has a great beam, while the AA one is astonishingly good, and comes with a very useful tailcap switch. Recommended.
Pictures to come.

Posted at 2006-09-10 12:30:09 by RichardLink to Update
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: