I'm not a number, I'm a free man.
Now that has been established, my next project is to do something about the sneaking admiration I've had for Apple all these years (well, OK, since the return of The Steve and the adoption/emergence of Mac OS X). My career winds back to days spent with UNIX OSes (of many a favour) and back further to administering a herd of Sun 3/50 and 3/60's. So, UNIX is like an old friend - though I'm far from a CUI geek.
One of the many things generating my erstwhile respect for Apple is the almost incredible execution of innovation mixed with the pragmatism required to deliver anything. Then there's also a sense of the ergonomic that pervades more than the exterior of their products. Yes, Apple is just another company making its money and engaged in all the practices of big business - but they do have a flair about it, and both their cult and the manner of their external face makes you want to believe that they are also trying to move things forward for the benefit of human sanity(!). Regardless of all that, they are certainly a company worth watching, and that is no longer such a minority viewpoint (compared to when *I* was a switcher back in early 2000, running the early beta MacOS X on my new black G3 Powerbook).
So, with time on my hands, I am committed to playing 'catch up' with native development on Mac OS X. It's a great time to be doing this properly too, with Leopard delivering a major step forward for developers in the shape of a much improved XCode (and friends), Objective-C 2.0 with GC, and vast improvements to system and application frameworks beneath the covers.
My previous tinkering with Cocoa, a little over a year ago, was intended merely as a self-introduction - so I had some kind of clue what the animal looked like. The result was not unacceptable, though hardly of interest to anyone else (apart from the 500+ people who have evidently visited my web page!): an emulator for an ancient 8-bit British microcomputer that used Forth as the operating environment. That exercise certainly whetted my appetite. Here are a few things I found:
- I actually really liked Objective-C. I have a respect for Smalltalk, but can't be doing with weakly typed dynamic languages for anything other than component orchestration (true scripting) (i). Objective-C makes a surprisingly comfortable compromise here. Plus, it's true what Apple say about the benefits to being able to embed basic C for the purpose of addressing system layers.
- I was amazed at Cocoa. Having seriously lived with Java since literally before its 1.0, I'm a little spoiled when it comes to nice class libraries. Yet, Cocoa has a zen all of its own, and some real beauty (though this is of course in the eye of the beholder, as ever). What's even more amazing is how much of this was available back in the very early nineties with NextStep. Interface Builder and NIBs are awesome (once you "grok their metaphor"). Bindings are very powerful, though prone to frustration as form of symbolic loose coupling. In other areas, I find the libraries a little minimalistic - providing the bare bones, but lacking some convenience (such as the lack of rectangle manipulation functions).
- MacOS X has so much elegance. It's big, and very 'layered', with some redundancies through both the layering (BSD, Core, App foundations) and history. Nevertheless, there are many aspects of its design that are highly commendable, and moreover, compare very favourably to the 'alternatives'. For instance, I love the way bundles work (applications, frameworks), the "xcopy install", the way preferences and configuration is handled. Every system is a compromise, but Mac OS X has many mechanisms that deliver robustness and encapsulation, without too much added complexity. I suppose I'm inclined to think about DLL hell and the wonder that is the Microsoft repository in terms of a contrast.
- The Apple documentation is variable. To be fair, it's quite voluminous and what's there is solid (and I appreciate how hard it is to keep solid, correct, documentation). However, there's much of it that is too terse. The reference material often elides important information that indicates intended usage, and although there is clearly an intent to provide this in the various guides and samples, there are big holes. This has been the cause of much too much "suck it and see" experimentation to my personal tastes (some of this is always necessary to learn, of course). For instance, trying to understand the code patterns to use the new NSCollectionView was a challenge, though perhaps this is differentiated by being brand new, with the collateral only just emerging.
So, now I want to get into a bit more of a serious relationship with this platform and development environment. The learning challenges stand ahead with Core Data next. Should be fun...
(i) In fact, I am the progenitor of a strictly typed lazy functional language, CAL, developed with colleagues at Business Objects.