As You Were

Devin Coughlin's blog.
Styles: Serious Spare

January 26, 2007

The mach_inject Heresy

Via Wolf Rentzsch himself I ran across a deliciously hysterical post on rixstep decrying the use of code injection on MacOS X. I won't make any comment on the merits of the argument because it's not worth my time. But I do have to wonder what kind of person would write such a thing?

An bizarre phenomenon.

It's very tempting to dismiss these types of blowhards as extreme partisans in the Mac vs. Unix wars too myopic to concede that there are good things and bad things about each — but I don't think that categorization is the right way to understand the phenomenon.

It's not about Carbon vs. Cocoa, or the spatial Finder vs. column view — it's really about the present versus the past.

Whenever two geographical cultures collide, the conservatives on each side mumble and grumble and scream bloody murder. There's really not much you can do about it but say "yes, grandpa" and wait for them to die. When these cultures are technological in nature, should we really expect anything different?

But here's the thing: The NeXT merger was only ten years ago. We'll be seeing these kinds of upheavals every ten years or so for the rest of our lives.

We're seeing it now in tension between compiled languages and scripting languages, managed and unmanaged code, desktop and web-based apps. It's all too easy to laugh at the javascript kiddies and their ridiculously awful user experiences (OMG, drag and drop in Yahoo mail, what a concept!), but they'll be employed doing UI stuff long after all of us rich-client desktop-types have been relegated to working on the back-end.

Adapt or die.

Even without major mergers, the amount of change in Cocoa in recent years has been staggering. I'd just finally mastered traditional Cocoa MVC when bindings came along and blew that out of the water. Then came Core Data and I had to learn a new way structure my data models. Next comes the switch to Intel and all of a sudden the six months I spent elbow-deep in PPC assembly doesn't look like such a great investment. Now we've got to learn Objective-C 2.0, and so on . . . It's hard not to be bitter about all this. Why should I learn x86 assembly when the PPC ISA is so obviously superior? Won't garbage collection make it too easy for the riffraff to come in and pollute the world with their crappy programs? And don't even get me started on the HIG.

Those of who are curmudgeonly by nature will have to fight that impulse for the rest of our working lives. But I don't see how we can call ourselves "real engineers" without keeping up with progress. What was latest-and-greatest ten years ago sits in the closet, unplugged, or clogs the landfills. In another ten it will be someone's weekend hobby.

Easier said than done.

But we're engineers, after all, we value reliability, predictability, safety above all else. How can we keep our designs conservative without becoming conservative ourselves? The pragmatic programmers recommend learning a new programming language every year (of course, they sell books about programming languages). If you're not learning a new language or framework every year, you're lagging behind in your professional development. If you are a Cocoa programmer, learn Ruby, learn Rails. If you've got the web-thing down, try a functional language. OO fanatics should explore prototype-based languages like javacript and Io. You'll need this breadth when Apple discontinues the Mac. (I kid, mostly). Nuns who do crossword puzzles each day live longer than those who don't. Do something new and challenging every day. Even if your new skills aren't immediately useful, the experience you gain while learning them will be. Most of all, don't stagnate — as you can see at rixstep, it's not pretty.

Posted by coughlin at 4:38 PM