Entries in Obj-C / Cocoa (2)

Tuesday
Apr282009

One Step at a Time

I decided to approach learning iPhone programming in a methodical way.  First, learn Objective-C.  Then, from everything I've read, the Hillegass book on Cocoa for Mac is simply the way to go, even for iPhone programming.  I am working my way through it and it indeed a great book.  But, certain things don't apply to iPhone development, for example bindings.  A part of me wants to jump past that stuff, but the book builds in a step-by-step fashion and skipping around just makes it less clear.  And, it is worth knowing the mac-specific stuff, because I will probably also do some mac apps and will also have a better understanding of the differences in the iPhone UIKit.

Comcurrently with reading the Hillegass book, I've been watching the Stanford iPhone developer class, which is fun, but I want to get into the iPhone stuff, for real and soon.

Yes, I admit to being impatient.  I've always been an impatient developer and I'm trying (really!) to change my ways and become more methodical.  My tendency is to dive in and learn along the way.  Yes, that would work, but I think I will be better served by taking a slower more careful approach.

I'm also hoping to be a little bit more proactive in my design approach.  I've always designed from the bottom up ... I just start working on little things and bigger things come out of it.  That is fun and actually has some advantages, but, it is also a bit haphazard and often results in the need to reorganize large chunks of code.  I need to slow down, let things happen in their own time, take a breath, smile, enjoy the learning phase, then the design phase, then (finally) the full-scale development phase.

I am having fun learning, although my mind is currently swimming with too much stuff.  One more reason that I need to start doing some concrete and not just examples.  I'll get there in due time (David ... keep telling yourself that ... it will get you through another day).

ONE .... STEP ... AT ... A ... TIME.

 

Sunday
Apr262009

Learning Objective-C

I've been learning Objective-C, the language of choice for mac / iPhone programming.  I'm having fun.  Something about it just makes sense to me.  The syntax is straightforward and not too complex.  It is a weakly typed language and has single inheritance, which contrasts to C++ (strong typing and multiple inheritance).  I never fully grokked C++.  I think this is due to many factors ... when I was learning C++, I was trying to move from a procedural world into OOP, but the world just wasn't OOP yet.  It wanted to be, but it wasn't, which made it all the harder for me to really think in OOP paradigms.  Now, in learning Objective-C, the underlying foundation is Cocoa.  Cocoa is object based and is a solid, polished framework.  Everything is a class and thus it makes sense to write classes to use and extend existing classes.  When I was learning C++, the framework I was using was, get ready for this, MFC (Microsoft Foundation Classes).  OMG!  What a disaster.  And C++ tried to be uber-powerful.  The combination left me confused as to why anyone would bother with OOP.  Oh yeah, and those were old-times where the extra performance hit (both memory and processor) of using OOP had to be carefully considered.

I took off 10 years from programming.  I think this might have been a good thing.  Perhaps it is possible to teach an old dog new tricks :-)