May 04

Learning to program for the iPhone

Tag: Geekstuff, iphone, macJoe @ 10:22 am

It’s probably no surprise that there has been a deluge of folks asking “Hey, what’s the best way to learn to program the iPhone”. Since I set up and run the Seattle XCoder’s group, I’ve been getting my fair share of those.

Some folks have traditional programming/CS backgrounds, and it’s easy enough to redirect them to some good resources to learn. It’s the folks that have little or no programming background, but who want to get into the game anyway that I’ve been finding harder to help. Much as we’re a great bunch of folks to ask questions and get tips, Seattle XCoders isn’t a tutorial house.

I’ve had several folks come to me with a programming background in javascript and nothing else. Javascript is clearly the new “BASIC” – probably has been for a while, and I haven’t been paying attention. I actually think that’s really cool on a bunch of different levels, but it makes explaining Objective-C, C, and memory management quite a bit more difficult. For a lot of those folks, I’ve had to punt – not much to help them. I suggest that they get a basic course in C programming and build up from there. I don’t think that’s really doing the whole setup justice, but it’s the best I could wrangle out.

As of yesterday, I might have a new tactic. Uli Kusterer has put up a “Learning C on the Macintosh” tutorial site called Masters of the Void. Uli’s done some really great things in Mac programming, and definitely know’s his stuff. Way better than me, definitely – and quite a bit more in depth than many I’ve run into. That being the case, I’m hoping it translates well into a tutorial on C for the Macintosh. The examples, details, and so forth in the site all point to using Xcode. I don’t know that it takes anyone beyond strict “C” programming, but it’s a hell of a jump start, and freely available.

So if you’re hunting around for a start on programming for the iPhone and you haven’t ever touched C, I’d say start with Masters of the Void and build up from there.

6 Responses to “Learning to program for the iPhone”

  1. Eugene says:

    What about “Programming in Objective-C”? Look it up on Amazon.

  2. Joe says:

    Frankly I found that folks without little programming background have had a very hard time dealing with the low-level constructs of C. Objective-C by itself isn’t hard – and it’s very easy to skim over some of the more difficult concepts in C. That leaves a lot of folks in sort of a bind just a bit further on when they want to use something from CoreFoundation or they’re having an error with the compiler that they just don’t understand.

    I actually prefer to recommend Cocoa Programming for Mac OS X by Aaron Hillegass as an “Intro to Objective-C” book.

  3. Gary W. Longsine says:

    I’ve had good luck pointing such folk to the book, Programming in Objective C, by Stephen Kochan. It’s an excellent introduction for programmers that come from scripting or other non-C backgrounds.

    http://www.amazon.com/Programming-Objective-C-Developers-Library-Stephen/dp/0672325861

  4. Uli Kusterer says:

    Just to explain a bit, the reason why I wrote MotV is exactly what Joe says: You may be able to wiggle through ObjC and Cocoa without knowing memory management, but eventually you will have to drop down to C for this or that feature, and even in a garbage-collected programming language, you need to understand ownership and control destruction order. MotV is supposed to help people learn the C programming basics they need for ObjC.

  5. Sasha says:

    I just purchased the development program from Apple. Jumped in with out any knowledge of programing. I’m a graphic designer, know how program in Flash do some web development. I have a great idea for a app and what it will do. Sounds like that after reading your posts that I’m going to have a heck of a time getting this done!…and it looks like I’m going to learn how to program as I go!!…Sucker for pain arent I!!! Keep you posted

  6. Tom says:

    If the types of people you are talking about are going to struggle to understand concepts of C such as pointers and memory management; they are not going to be able to jump straight into ObjC for the iPhone.

    ObjC uses pointers everywhere and the iPhone doesn’t have a Garbage Collector (only Mac development has the new ObjC2 GC)

    I would recommend learning C, then an object orientated language such as C++, C# (Mono), or Ruby. This way they can grasp the fundamentals before attempting anything commercial.

    It is hard. But isn’t that half the fun????

Leave a Reply