The goal of the Missing Manual series is to get you started with a new endeavor by just presenting the most important topics. Explaining basic programming fundamentals fell outside this scope.
Regardless, there are still a lot of people who want to get into iPhone development and have no prior experience with software development. This post is for those people: I’ll present some pointers that will help you get over the hump of learning to think in code. Hopefully, you’ll want to buy my book afterwards. :-)
Learning to Think in Code
One of the hallmarks of a good developer is that they can think in code. When faced with a problem, they instinctively know how to break it down into its constituent parts. That, in turn, leads to the eventual implementation.
Learning to think this way is essential. The language you use to develop this skill isn’t important. Many of the resources below have no syntactic relation to Objective-C (especially ones that focus on Ruby.) They are, however, conceptually the same as the language you’ll use to code on the iPhone.
I should also point out that I haven’t read many of these books. I first started writing code in 1976 and was introduced to C in 1983. It’s been a long time since I was a beginner, so I asked my followers on Twitter for suggestions. The links below are the ones that looked most promising after checking out the table of contents.
The Very Basics
Objective-C is an easy language to learn assuming you have good foundation with its progenitor: C. The problem is that C is not a particularly good language to start out with: it’s popularity is based on its power. And with power comes complexity.
Several followers suggested books that discussed Ruby and Python. There are a couple of reasons why these languages make good choices:
- Simple syntax — when the language you use to develop your first code doesn’t get in the way, it’s much easier to focus on the concepts behind that code.
- Interpreted, not compiled — C and other languages based on it (like Objective-C) are compiled languages: this extra step makes it harder to experiment and play with the concepts.
If you’re an absolute beginner, these books should help get your mind working like a programmer:
- Why’s (Poignant) Guide to Ruby by _why — This free book is a joy to read. When I first started learning to use Ruby, it taught and entertained me at the same time. The comic book format is particularly good at keeping visual thinkers engaged.
- Learn to Program by Chris Pine — I’ve read several books from the Pragmatic Programmers and they’ve all been excellent. I wasn’t aware of this title, but it looks like a great introduction to programming using Ruby.
- Head First Programming by David Griffiths & Paul Barry — Like others in the Head First series, this book takes a very visual approach to the learning process. There are plenty of diagrams and graphics that help you understand how code works. The book uses Python in its examples.
At the heart of Objective-C is the C language. You’ll want to be familiar with it’s syntax before you jump into the process of learning how to code with the Cocoa Touch frameworks. Here are some books that will get you up to speed with this language:
Objective-C first became popular with NeXT computers in the 1980’s. The transition to Mac OS X starting in 2000 brought this language to the Mac. With this head start, there are a lot of great books that explain how to use Objective-C using Xcode on the Mac. Using the Mac as a first step toward attacking iPhone development isn’t a bad approach:
I’d be remiss if I didn’t list a couple of the books that helped me learn Cocoa. These are certainly more advanced texts, but I wouldn’t be doing iPhone development without them:
- Cocoa Programming for Mac OS X by Aaron Hillegass — A great book for developers who already feel comfortable with C: it wastes no time and dives right into the essential parts of the Cocoa frameworks.
- Cocoa Design Patterns by Erik Buck and Don Yacktman — A fantastic overview of the different approaches the Cocoa frameworks take to solve common programming problems. I frequently find myself using this as a reference when confronted with the eternal question: “How should I implement this?”
Hopefully these resources will help you get up to speed and prepare you to build your first iPhone app!