Write Once, Debug Everywhere
The GC that let me stop calling free, the JVM I patched by hand, and a slogan that came true — just late, and never clean.
A look back — long before any of the tools we argue about now.
You Don’t Have to Free It?
C and C++ turned into a different language the moment pointers and malloc showed up; every assignment became a war with segmentation faults and core dumps. Then a new language appeared, with a garbage collector running underneath — allocate, use, and never free. I remember being genuinely happy about that. But for various reasons, when the GC kicked in on the JVM the whole system could grind nearly to a halt, and dodging those pauses felt like a game of hot potato. Just don’t blow up on my watch.
I grumbled my way through a lot of JVM work after that, and there were stretches where any performance problem meant rewriting the whole thing in C. Later I saw plenty of the reverse, too, and as stranger and more wonderful languages kept arriving, the memories faded. As for memory itself — nearly twenty years on, at Google, I still remember long discussions about who allocates and who frees. Not an easy problem, clearly.
Applets
My first real meeting with Java was the Applet — dynamic pages running in the browser — and through a few assignments I got as far as Servlets, working on the JVM side of things. There was a stretch of agonizing over whether to learn ActiveX and Microsoft’s Internet Explorer, or to wrangle Java Applets in Mosaic and Netscape instead. I remember grumbling my way through homely awt and swing UIs, implementing this and that with the back of my hand.
Then I looked away for a while after graduating, and by the time I looked back the world had moved to Android, Java on the server, Kotlin — and I still feel a kind of awe at how far it spread. Watching things once declared impossible quietly become possible, I have to admit: “write once, run everywhere” really was a beautifully made phrase.
Kaffe
My assignments, undergrad and grad, were about building environments that analyzed or ran Java bytecode and did something with it. On Embedded Linux you still wrote the apps in C, and reading bytecode to act on it was closer to generating assembly than to anything else. This was before the dazzling experiences of OOP arrived. I remember downloading Kaffe — an open-source JVM — and patching it as I went, and how Oracle’s Java and OpenJDK differed just enough that “write once” still meant an endless slog of matching versions.
Not the 1990s anymore, but later, doing my mandatory service as an engineer at a company that meant to build a smartphone on Linux, Java gave me a hard time and rarely did what it was told — so I went with the more stable Symbian and C++. The best choice available then, surely, though that world soon split in two between Objective-C and Java, with the web’s counterattack still to come. An industry with no end of things to learn in a hurry.
P.S. Both promises came true in the end — garbage collection, and write-once-run-everywhere. Just later than advertised, and never quite as clean.
Part of 90s Computer Science Stories — first-person notes on growing up with computers and studying CS in Korea in the 1980s and ’90s. See the full series →
Adapted from my Korean essay on Brunch: brunch.co.kr/@chaesang/41
Comments