July 19, 2009

Big Nerd Ranch Day 2: Objective-C overload

classroom during open labToday was our second day learning Objective-C. We got much deeper into it today, and the programs in our exercises were getting more and more complex. By dinnertime, we had learned how to tap into services being broadcast from other peoples’ computers and capture the information (iChat, printer sharing, iTunes library sharing, etc). It was pretty cool, even though it was still on the command line.

I really do feel like I have a solid enough understanding of the language to start writing programs on the iPhone. We set up our phones tonight to be ready for development, and now there’s a test app on my phone that is nothing but a white icon that opens a white screen.

(You know those Flashlight apps on the App Store? That’s all they are. It took about 20 seconds to make it and put it on my phone.)

Our new instructor, Joe Conway, seems like the perfect kind of guy to be teaching the rest of the week. I looked ahead in the exercises for the week (there are two giant books he wrote for the week… the exercises alone are about 200 pages) and his writing is hilarious. He’s sharp, quick, and had a good presence in front of the group. He’s younger than I expected—I think he’s around my age!

All the meals were fantastic again. I won’t go into as much detail as I did yesterday. I will say that I had never had trout before tonight, and I liked it a lot.

Tomorrow we write our first iPhone app. By tomorrow night I should be able to get a solid start on the app idea I brought with me, which is incredibly exciting.

One last thing, on a much more technical note: The square-bracket function calls, while frustrating at first, are absolutely perfect for passing multiple arguments. Tell me, which is more readable:

PHP:
[php]if (strpos(substr($string, -4, 4), ‘.png’) !== false)[/php]

Objective-C:
[cpp]if ([string hasSuffix:@".png"])[/cpp]

I don’t know about you, but I couldn’t find “strpos” in the Oxford English dictionary. “Suffix” was in there, though.

(Possibly) Related Posts

  1. Big Nerd Ranch, here I come!
  2. Big Nerd Ranch Day 1: Basics and a wood tick
  3. Big Nerd Ranch Day 0: I have a jacuzzi!
  • Richard

    I was initially disturbed at the square-bracket function calls too; however I soon realized that no shift key action was required thus giving my left finger a needed rest. The trout on a round plate ultimately gets my vote.

    Glad to see you are getting up to speed on the Iphone.
    Best of luck,
    Dad