Archive for the ‘Programming’ Category

Coding for the iPhone

October 5th, 2009

I have been working on learning to code for the iPhone and it is an interesting and challenging experience.

I have been primarily a .Net Developer for my entire career. I have worked with C-Based languages, but mainly that was c#, which is quite advanced as far as C-Based languages go.
What I am finding the most difficult though are the things that feel a tad archaic to me. For example, nearly every language I’ve ever worked with used the period key “.” to access methods and properties of an object. It’s very strange for me have to access those items by placing the item within a set of brackets.

For those that aren’t aware, in c# where you might type something like:

this.title = "Hello World!";

in Objective-C it would be:

[self setTitle:@"Hello World!"];

That isn’t the only place where Objective-C feels strange though. For one thing, the language is so descriptive that it makes me feel uncomfortable at times with how much information I’m seeing in method and property names. For example: numberOfRowsInSection, viewDidLoad, viewDidUnload, didReceiveMemoryWarning and more.

Something about the way that Objective-C deals with naming conventions feels right, but so different from what I’m used to seeing. Maybe I just haven’t been seeing properly written code before this. Who knows.

The biggest hurdle though?

Pointers.

Apparently I come from a cushy programming world where memory management is handled for me. I understand memory management (if you aren’t using it anymore, get rid of it) but I am not quite sure where all the pitfalls of pointers are quite yet, nor what all the syntax to do with them means. I NEED to understand WHY things happen before I fully understand what I’m doing.

I’m currently working on the excellent series of iPhone tutorials over at iCodeBlog.com. I highly recommend them.

categories: Programming | Comments Off