- November 29, 2010
- 0 Comments
Back in college I was fortunate enough to sign up for CS 193e (or was it d?). My friends sometimes joked that I majored in CS193 because I took just about the whole series a, b, c, d, e, u, x, etc. The class was focused on learning to program in the NeXTSTEP environment – NeXT was Jobs’ workstation company, and they had produced really interesting development tools – the Interface Builder and the App kit. In my C++ class we took ages to write things like Chunk Lists and other general-purpose data structures. In our 193 class, we built a calculator application (UI and all) in the first week’s assignment. I was hooked.
The underlying programming language was objective-C, which I found to be a slim and elegant cousin to C++. It was much more productive to write user interfaces in objective-C with NeXTSTEP than any other platform I had used (and more productive than the Visual Basic platform I was going to learn once I left college). Objective-C had some amazingly useful features, like protocols (a precursor to interfaces in Java), and category extensions (adding methods to an existing class, without modifying the original source of the class- think of it as subclassing without a subclass).
Following that class, and another on programming Motif interfaces in Unix (wow, that was a real shift from NeXTSTEP), I landed a summer internship at the Stanford Linear Accelerator. You know, the place where they smash atoms together and measure the tiny high-energy particles that are produced as a result. I had only a passing understanding of high energy physics, but I got the job because one of the researchers in the Theory group wanted to port their statistical drawing package, HippoDraw (written on NeXTSTEP) and Hippoplotamus (as I recall, a portable C package) to X-windows/Motif, so that more high energy researchers around the world could use it (only a small number of them had NeXT machines -and a large percentage of those were at SLAC itself).
We took an interesting approach to porting… thanks to an idea from a fellow Stanford student. We used a category extension to overwrite the the write methods and save out our interface definitions in a format which we could read back in and from which we could inflate an X-windows/Motif application, even though the application was written and defined in NeXTSTEPs Appkit and Interface Builder.
Since we could write out all of the instance information we needed to reconstruct the UI, we had a simple task. As I put it at the time “all we have to do is port the appkit classes to x-windows/Motif.” It was Paul’s idea, but only an undergrad CS student could think it would be so easy as that! So instead of porting our application, we ported the middle layer of software that translated all our application commands into User Interface. And of course we relied on the GNU project that allowed for compiling objective-C code. And Paul Kunz, my mentor on the project, helped launch the GNUstep project and contributed our code to the effort. (As a side note, Motif wasn’t open source so the whole display mechanism was eventually swapped out to get more purely open source).
So imagine my surprise when I saw Daring Fireball reference GNUstep. Apparently Sony’s new SNAP developer framework is based on GNUstep and Objective-C. Far from being odd- I think its a good choice. Objective-C is a better language than many non-Objective-C developers give it credit for. And it has enabled a suite of very productive development tools from Apple/NeXT. I’m not sure you could build tools that are as easy to use for a language that is more complex, like C++.
It is just fascinating to me how little pebbles rolling down hill can gather momentum over time and that the unintended or unexpected consequences can be far-reaching.
Late-breaking update: AppleInsider reports that the project is now on hold. Maybe they didn’t like the publicity around the GNUstep / Apple connection. Or maybe it is unrelated.