I've been weaving these threads of cubist pseudo-consciousness for over
a year now, and the consequences of such promiscuous international celebrity
are really starting to get out of hand.
It seems as if I'm constantly handling "product placement" e-mails from
big-shot marketing types, begging me to scrupulously avoid any mention of
their products whatsoever. (They always add that "whatsoever" in there, as
if I'd try to sneak something in on them. Well, you don't have to hit me
over the head with an Uncle Bernie's Fine Cavalla mackerel!)
I've been up to my scalp in Java code again this month and have enjoyed
many opportunities to reflect on its unique strengths and weaknesses. Most
of these wool-gathering sessions end rather abruptly, as a build completes,
a button needs pushing, or another blankety-blank test case blows bitwise
chunks all over the logs. Reality intrudes with an indelicately echoed
Ctrl-G, and it's another trip to the top of the E/C/D waterfall (and me
without my barrel). I can't believe they pay me to have all this fun.
One thought that keeps recurring during these flights of javac-induced
fancy is the very different nature of the bugs I find myself chasing and
squishing in Java, compared with the other languages I've used (and I've
used a few).
At the risk of dropping my pretentiously thin veil of false humility
the one you've seen through since day one I must say I've cranked out some
serious code since becoming a professional programmer, and there's no end in
sight. Some of the popular languages I've used (and abused) include REXX,
MASM, Tcl, awk, gawk, Perl, Pascal, Modula-2, C, C++, csh, and my favorite,
Java (of course). At best, I've "mastered" maybe one or two of these
languages at some point over the years. (Sometimes I imagine that Java
belongs on my "mastery" listŠthen I wake up.)
Way back before this whole overblown "microprocessor" fad perturbed the
orderly Hollerithic landscape of fanfold batch computing, I even programmed
something called an "electronic analog" computer (and badly, at that).
Electronic analog computers are "programmed" using patch cords and
panels, and I was not without innate skills in that area, even in high
school. In fact, I was a natural. I'm here to tell you I could plug and
unplug those patch cords lickety-split, thank-you-very-much.
Unfortunately, since I didn't have any idea which plugs to patch where,
my results stunk (often literally, wafting an aroma of melting plastic
insulation). I guess I should have paid attention to that Calc II
prerequisite, after all.
With apologies to Henry Spencer (author of the "Ten Commandments for C
Programmers"), perhaps there is an analog computing axiom/corollary/lemma
for would-be OO programmers: "Be careful how you hook your objects together,
lest they stink." Yeah, that quote will ensure me a spot in history. You
Anyway, analog computers are really quite remarkable. If you patch
together the right combination of plugs, you can accurately and continuously
model complicated parallel mathematical equations of many variables. To the
extent that these mathematical equations correctly model an "analogous"
physical system, the electronic system behaves just like that leaf spring,
or that ambient vapor pressure, or that trout population, or that ICBM nose
cone. (If you're interested in finding out more about analog computing, try
dropping the phrase "analog computer" into your favorite search engine or
visit Doug Coward's wonderful "Analog Computer Museum" Web site,
So far, I've yet to chase a pointer bug in Java, but that's not to say
that it's all a bed of roses. For my part, I've found Java's principle
sanity thief usually extends java.lang.Thread or implements
java.lang.Runnable; thread synchronization bugs can be deucedly difficult to
dispatch or dismember.
I remember a piece of multithreaded Java code missing some
synchronization in a chained assignment statement:
inNdx = outNdx = 0;
It's around 4:00 p.m. on Friday when the call comes in: "We've
encountered an ArrayIndexOutOfBoundsException that stinks like burning
insulation. You didn't let Wyman near this code, did you?"
Blair Wyman is a software engineer working for IBM in Rochester, Minnesota,
home of the IBM iSeries.