The glazed look on some developers’ faces usually emerges on Day 2 of my three-day Objective-C intensive training sessions. Having taught several hundred students this programming language, I know these deer-in-the-headlights expressions well. It means the developers - aghast, frustrated or worse - realized they simply don’t have a handle on the concepts behind Objective-C.
There’s a good reason many developers fall victim to what I call “the stare.” They’ve honed their programming expertise and gotten into a groove of expectation: every programming action they input produces a result they can account for and see. But that’s not how the engineers at Apple wanted Objective-C to work, which means the language doesn’t particularly care what you think or what your ingrained programming habits are. Apple is indifferent to your inability to figure out the “magic” of Objective-C which happens behind the scenes.
Magic is not the sort of concept you’d find in most developers’ dictionaries. Magic suggests a loss of control, something every programmer that I know is loath to consider. But, for a fruitful relationship with Objective-C, programmers literally need to get with - or, better yet, inside - it.
Here’s the crux of it. Apple wants to be helpful. Actually, it forces its helpfulness on you by providing frameworks - so you don’t have to spend hours of coding - that you accept on faith will work. But it’s sort of a left-handed generosity that smacks of my-way-or-the-highway. Apple says, “Here’s an easy way to do this procedure, as long as you follow it to the letter.”
At your end, you might appreciate that they’ve given you a short-cut. But make no mistake about it - what Apple is handing you on a plate is very complicated stuff. Which is why it’s often better to just surrender to it, and accept that you can be well served without knowing the why’s and how’s of what’s hidden from view.
I advise my clients and students to recognize that their frustrations are surmountable psychological barriers and to pretend they’re brand new programmers, open to certain programs’ idiosyncrasies. And I assure them that once they become more experienced with Objective-C, there’s a good chance they’ll love how much they can accomplish with it.
You might have to adjust your programming handbook to accommodate Apple’s looking out for you. But you’ll sleep better at night if you do.
Matthew Campbell (Twitter: @MattjCamp) is an app developer and owner of Mobile App Mastery, a training company for software developers. He’s the author of Objective-C Recipes: A Problem-Solution Approach (2012, Apress).