How did YOU learn to program for the iPhone

Discussion in 'iOS Programming' started by Metal Dice, Jun 22, 2009.

  1. Metal Dice macrumors regular

    Metal Dice

    Joined:
    Jun 3, 2009
    Location:
    Denmark
    #1
    Hey I'm currently reading a book on programming. Not any specific programming language just standard programming knowledge that every programmer should know.
    I wanna know how you guys learned programming for the iPhone. Which books did you read... Because it might give me an idea on how people learn it. I know all the books out there. I just wanna know how you did it. Which process...
     
  2. iShater macrumors 604

    iShater

    Joined:
    Aug 13, 2002
    Location:
    Chicagoland
    #2
    I did a search on the forums about the same question. :rolleyes:
     
  3. jnic macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #3
    Was comfortable with C and OOP (via Java and a few others). Read a little background on Objective-C (in particular the message-passing paradigm and reference-counting), skimmed the guides and documentation, and made a "Hello World" app.

    Then with that more practical understanding I went back and read the documentation more thoroughly, and learned API docs as they were needed.

    I have Erica's book, though I think it's more interesting than it is useful in practice. A combination of the API reference and Google are generally more than enough.
     
  4. Meek Wriggle macrumors member

    Joined:
    Jun 10, 2009
    Location:
    UK
    #4
    The knowledge came to me by divine revelation... Just kidding, I'm currently reading Programming in Objective-C 2.0. I did want to delve straight into iPhone programming but after hunting round and reading reviews on Amazon I learned that it's best to get a grasp of Objective-C first. If you're completely new to programming you should probably start with with the book I mentioned too. I've done a bit of C/C++ (and Java) in the past so some of the stuff in the book isn't new (like the OOP concept lessons). Objective-C reminds me more of Java than C++ (in terms of its very verbose syntax at times).
     
  5. jerrywickey macrumors member

    Joined:
    Apr 16, 2009
    Location:
    Key West
    #5
    Personally, me, I learned to program way back when we had to chisel punch cards out of stone. Then after programming for many platforms mostly, procedural, and when the iPhone came along, I picked up object oriented programming just for Obc C in XCode.

    Studied every line in the HelloWorld.app.

    Wrote an outline for an app I wanted to write.

    Dissected the core task of that app until each subtask could be accomplished by programming mnemonics with which I was already familiar and which I beleived would likely be or should be represented in XCode Objective C.

    If I didn't know the XCode Obj-C syntax for a mnemonic, I googled, asked in this forum or read the reference material until I did know the syntax.

    I kept that up until I understood all of them and then, of course, the app worked and was finished.

    Now I am writing another.


    Learning to program and learning to program for any particular platform, including the iPhone are two different things.

    Programming is about learning how to separate any irrational, ambiguous task into sub tasks and further separate those sub tasks into even smaller sub tasks until each sub task can be accomplished by a single unambiguously definitive instruction mnemonic.

    Objective programmers would never call [receiver message] a mnemonic because they think of jnz and ld as assembler mnemonics but in the strictest of meaning, the highest level programming languages are simply made of mnemonics which are all compiled to machine code.

    I learned to program than I learned the mnemonics for each platform.

    And I agree with Meek, Obj C is very, tediously verbose. Whoever came up with the concept was so true to his idea that he forgot that programming should be far simpler. Then after that, he caved anyway and still allowed functions instead of requiring everything to be a method. So I guess we are stuck with a cute idea that is still saddled with every other cute programming idea that ever came along.

    Jerry
     
  6. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #6
    1. was already "comfortable" (self-taught) with HTML.
    2. studied JavaScript using online tutorials.
    3. studied Flash and ActionScript
    4. wanted to develop for mac, so i read these books:

    - Cocoa Programming For Dummies
    - Absolute Beginner's Guide to C
    - Programming in Objective-C
    - Learn Objective–C on the Mac
    - Programming in Objective-C 2.0
    - Cocoa Programming for Mac OS X

    5. with all that information, i wanted to study iPhone Dev, so i read these books:

    - The iPhone Developer's Cookbook
    - Beginning iPhone Development

    6. currently watching the Standford University iPhone class on iTunes U.
    7. although determined and loaded with knowledge, i still suck! ;)

    good luck!!
     
  7. domness macrumors 6502a

    domness

    Joined:
    Jan 14, 2008
    Location:
    Sheffield, UK
    #7
    I started off with a few 'Hello World' apps and then used the iPhone Developer Cookbook to help me further.

    Once I had played around with a few concepts I checked out a number of tutorials online along with video tutorials. These helped alot.

    I kept on practising and learning all the way. Stackoverflow.com was a great help and also chatted to a few programmers on Twitter and AIM who helped quite a bit.

    Learning myself just expanded from there on just checking online documents for APIs etc.
     
  8. Metal Dice thread starter macrumors regular

    Metal Dice

    Joined:
    Jun 3, 2009
    Location:
    Denmark
    #8
    Did you have any kind of experience before you started doing this
     
  9. Saladinos macrumors 68000

    Saladinos

    Joined:
    Feb 26, 2008
  10. namanhams macrumors regular

    Joined:
    Jun 3, 2009
    #10
    I start by reading "Programming in Objective C 2.0" by Stephen Kochan, and i never regret reading it. Assume you have a background on programming, i recommend you read this book to get familiar with Objective C first, before diving into Iphone stuff. When you have good background on Objective C, you'll find that learning the Iphone stuff will be much faster.
    For the Iphone stuff, i read this book "Beginning Iphone development - Exploring the iPhone SDK" by Dave Mark and Jeff LaMarche. It's a good book for beginner and is recommended by a lot of people.
     
  11. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #11
    OK. I didn't have to use a chisel. The university had a room full of card punch machines. Fortran and a bunch of other languages. I've not only used, but implemented a dynamic OOP language. Obj-C reminded me of a weird combination of stuff from about 3 or 4 other different programming language implementations that I'd previously been exposed to (including a macro-assembler which supported a similar form of punctuation abuse...)

    Took me about 6 weeks from first installing the SDK till I had my first app (not a flashlight) ready to submit to the App store. Including a couple days with the Hillegass book to learn the funny Obj-C syntax, a few days with various online video tutorials to get the hang of Interface Builder, a couple more weeks (mostly using Apple's documentation and example code) to get a handle on a sufficient amount of the UIKit framework to flush out a complete app, and the rest mostly graphics and animation design, coding, debugging and performance tuning. Might have spent more time (and $$$) with the graphics design consultant trying to get the artwork right.

    ...now about a year and several apps later, and I'm still learning more as I go. It's a fairly deep API and SDK even for someone with a bit of experience.

    ymmv.
     
  12. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #12
    I started off reading through a basic guide to C as I hadn't really done any C programming beforehand before quickly moving onto Apple's own introduction to Objective-C. I had a good read of the documentation, especially stuff relating to memory management.

    I then purchased Aaron Hillegaas's Cocoa book (3rd edition) which gave me a great overview of Cocoa and furthered my Objective-C knowledge.

    Then I went back to the Apple documentation and just went from there. I was already experienced with the ways of object-oriented programming (I have been using Ruby for about 5 years now) so it was mainly a case of learning the new language, the new framework and common idioms and patterns (e.g. I've found delegation is a key to good API design in Cocoa).
     

Share This Page