A graduate student and I are attempting to teach ourselves Objective-C and iOS development this semester.
Here are a few lessons I learned or relearned this week:
- I have a deep distrust of GUIs that generate code. Working through Apple’s intro material, it was difficult (though not impossible—see the next lesson in this list) to keep straight the code it would kick out and the code I’d be responsible for writing myself. And I do think that the Xcode GUI made it seem worse; I am totally cool with using the
rails generatecommands in Rails, which do effectively the same thing. But add a pointer device and drop-downs and things I have to click, and I’m pretty sure I’m learning the kindergarten version of iOS development.
- Git is an indispensable learning tool. Yes, professional developers use source-management tools like Git to collaborate and make it easier to change their minds, but when you’re learning, Git makes it equally easy to run back and forth through the code you’re writing. And when it comes to putting your trust in the hands of any code-generating mechanism (XCode, or Rails, or anything else), Git provides an unvarnished view of exactly what is going on with the interfaces mucking with your source code. Make a commit at each step of what you’re doing, each thing you click or command you run, and all it takes is running
git diffto see what’s changed, or
git statusto see the new files that have been added.
- I want to learn the code, not the IDE. I knew going in that Objective-C is the language of choice for iOS as well as Mac development. I also knew that there are tight integrations between Xcode and Objective-C. But both my graduate student and I wanted a whole lot more code and instruction in Objective-C right from the get go. The intro tutorials felt too much like a Disneyland tour of Xcode (then again, this student and I are rare and hardcore birds when it comes to wanting to wallow in and wrangle with source code).
So this week, we’re focusing our efforts in a few obvious areas (to us, at least at the moment). The first is that rather than going blindly through Apple’s tutorials, my graduate student and I are working on our own app ideas to guide our learning. I’ve always emphasized this in the classes I teach on digital design and development; turns out I tend to benefit when I follow my own pedagogical advice. Have a project in mind, and work to realize that vision. And don’t compromise.
The second is that we’re diving head-long into Objective-C as a language. The two of us did some research and agreed that we’d start by reading the second edition of Aaron Hillegass’s Objective-C Programming: The Big Nerd Ranch Guide.
It’s amazing to me the lessons I have to relearn: years ago I embarked on a similar plan to learn Rails, and thought I’d just dive right into Rails without spending any time trying to get to know rudimentary Ruby. Big mistake. It turns out having some foundations in Ruby was a big help towards conceptualizing what Rails was doing, let alone being able to dive into the different domain-specific languages that Rails uses for models, views, and controllers.
The end goal of all of this learning, for me, is to one day be able to offer a course in iOS development. But as I don’t have the kinds of pressing, research-/career-aligned need to build iOS apps the way I do web design and dev stuff, I’m grateful to my graduate student for helping me to stay motivated and committed to learning this. I’m going to try and blog about the experience each week, and really reflect on the feelings of cluelessness and helplessness my students have when I teach this sort of thing.