The Daydream Blog

Unlearning Cocoa

Wednesday, July 9th, 2008

Note this article is intended for developers and may be of limited interest to our wider client base.

Kevin Hoffman has given a critique of the now infamous criticism of iPhone development. (Another Microsoft Developer Falls Victim to Framework Myopia [The .NET Addict's Blog])

The key points in Kevin’s post are his explanation of how experienced Windows developers should handle their migration to Mac or iPhone development. It reminded me of a post I’ve been planning to write for a long time that most easily be summarised as:

To learn Cocoa, you must un-learn your past development experience.

Cocoa assumes an MVC paradigm. Interface Builder and NIB’s are very weird compared to other approaches. The frameworks are heavily designed for sub-classing to create your own behaviour, rather than having lots of settings to tweak behaviour.

Every time you try to learn a new aspect of Cocoa, you find yourself struggling to do something that feels like the “right way”. A few days later you come out with 3 lines of code that feel completely natural but felt incredibly painful to reach. You will be met with countless, “aaah, that’s how it works and it makes complete sense” moments. You spend days wondering why this bit of Cocoa is so gnarly, and seemingly unintuitive, until you reach another moment of understanding.

People often say that Cocoa has a steep learning curve. It does not. It has a steep un-learning curve, followed by a gentle re-learning curve. Getting yourself out of your previous development mind set can make the whole experience a lot more pleasant.

What is disappointing is that none of the documentation or tutorials spend much time comparing and contrasting with other approaches, that would make the process of unlearning easier.

 
Site by Line