Object oriented … what??

Soooo, I completed level 1 of code school’s “Try Objective-C”.

I have to say that I really like the way the course is laid out – it’s playful and fun! The course has 5 levels and I get points for completing them, yay!

I learned how to create string and number objects and how to show them on screen:

NSString *firstName = @"Nicole";
NSNumber *age = 33;
NSLog(@"%@ is %@ years old", firstName, age);

Level 1 also touched on creating arrays and dictionaries.

Luckily I’ve had some exposure to C++ and Java programming way back when I was at uni. I never used those languages in “real life”, but it really helped me understand the underlying concepts of Objective-C.

For someone starting out completely from scratch, terms like “objects” and “classes” might be a bit daunting.

So I had a bit of a dig around and by far the best resource I could find on object oriented programming is this article here: http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep#OOP

It explains the concept pretty well, with some great examples so even novice programmers can understand it.

I especially liked their “hand” example:

The “hand” is a class. Your body has two objects of type hand, named left hand and right hand. Their main functions are controlled/ managed by a set of electrical signals sent through your shoulders (through an interface). So the shoulder is an interface which your body uses to interact with your hands. The hand is a well architected class. The hand is being re-used to create the left hand and the right hand by slightly changing the properties of it.