iOS and Objective-C, Part 1

As a longterm Mac user and iOS user who is majoring in Computer Science, I have always been interested in learning how to write for OS X based platforms. So when I saw that Stanford University had put their class CS 193P iPhone Application Development on iTunes, I just knew. While I’ve been focusing on my Social Network (more to come on Monday!) I also have been devoting some time to learning this. Tonight, I finished the first assignment: an RPN Calculator, which use stacks.

While it was mostly a walk through, it was still pretty challenging. The syntax of Objective-C is so much different than stuff I am accustomed to in C, C++, and PHP. It is certainly a learning curve. That said, there are a few things that I already starting to enjoy. Just like Javascript, one times like so:

double result = [self.brain performOperation:sender.currentTitle];

New in iOS is Automatic Garbage Collection. It is so nice to not have to worry about what is happening to every single piece of memory that is allocated. At the same time, Xcode is really really nice. Xcode is really great about auto completing variables, and it is very easy to access documentation so if I do not know how to do something, I can easily figure it out. I’m looking forward to continuing this iTunes U course.

Screenshots Below: