I'll try again
24/01/07 21:43 Filed in: Software
Trying my hand at cocoa programing again (3 times
lucky).
Some time ago on my old (now inactive) blog, I did a
post about my attempts to penetrate the mysteries of
programing using the Cocoa framework on the mac. I
tried (and failed) to wrap my brain around the whole
Cocoa, Objective-C programing thing. After all Apple
give me every thing I need to turn out fully
functional applications for free (if wanted to do
that on windows I'd have to hand over a large sum of
money!)
I'm trying again, mainly inspired by the Late Night Cocoa podca...sorry netcast. My previous two attempts have helped here a tiny bit, but cocoa and objective c is very different to anything I've used before.
My professional programing life is spent maintaining very dense, poorly documented perl webserver to database API. I also get to play with some javascript and XML web front end stuff (all my own work!), so there isn't much there to prepare me for cocoa.
I've played around with ordinary C before, but that was a long time ago, back in the days of GEM and the Atari ST.
Haaaa, I remember fondly the joys of event_multi, a huge beast of a function which took something like 20 parameters! Most of which where references...no sorry pointers (I'm showing my perl background now!) to structures which held all of the users actions. Okay maybe that wasn't so fun, but at least I managed to turn out one or two (and I do mean 1 or 2) programs which did something useful (marginally!)
After that I moved on Windows and since I had an...er...evaluation copy (cough) of Visual studio I thought I'd give it ago. How hard can it?
Well Windows showed me! Event based programing which I'd first experienced in GEM took some getting used to, but it did in the end. The same can't be said of Windows C programing. Just to get to 'hello world' in a window you had to register a class, instantiate it... and well I'm sure there was more than that in those 200 lines of code. The the code it's self, it was so full of macro's and typedefs that it didn't even look like C any more. Yes I now know that the macros and typedefs where a good thing, but...well I never did get beyond hello word on Windows.
So now I come to Objective C and cocoa. Well again the code doesn't look that much like normal C, with all it's square brackets, but at least it doesn't claim to be just C. I've had a lot more experience in programing now and at least Xcode is a lot less intimidating than visual studio was, but even still cocoa is just weird!
The whole idea of message passing is different to the GUI programing I've done in the past where controls have event handlers assigned to them, I know in the end the effect is the same but I still think in terms of event handlers and not messages.
All this said I'm not going to give us this time, I've love my mac and as a programer I have to conquer cocoa (try saying that fast).
The mac is home to some of the coolest programs and programers is the world, so I just can't be left out of that!
I'm trying again, mainly inspired by the Late Night Cocoa podca...sorry netcast. My previous two attempts have helped here a tiny bit, but cocoa and objective c is very different to anything I've used before.
My professional programing life is spent maintaining very dense, poorly documented perl webserver to database API. I also get to play with some javascript and XML web front end stuff (all my own work!), so there isn't much there to prepare me for cocoa.
I've played around with ordinary C before, but that was a long time ago, back in the days of GEM and the Atari ST.
Haaaa, I remember fondly the joys of event_multi, a huge beast of a function which took something like 20 parameters! Most of which where references...no sorry pointers (I'm showing my perl background now!) to structures which held all of the users actions. Okay maybe that wasn't so fun, but at least I managed to turn out one or two (and I do mean 1 or 2) programs which did something useful (marginally!)
After that I moved on Windows and since I had an...er...evaluation copy (cough) of Visual studio I thought I'd give it ago. How hard can it?
Well Windows showed me! Event based programing which I'd first experienced in GEM took some getting used to, but it did in the end. The same can't be said of Windows C programing. Just to get to 'hello world' in a window you had to register a class, instantiate it... and well I'm sure there was more than that in those 200 lines of code. The the code it's self, it was so full of macro's and typedefs that it didn't even look like C any more. Yes I now know that the macros and typedefs where a good thing, but...well I never did get beyond hello word on Windows.
So now I come to Objective C and cocoa. Well again the code doesn't look that much like normal C, with all it's square brackets, but at least it doesn't claim to be just C. I've had a lot more experience in programing now and at least Xcode is a lot less intimidating than visual studio was, but even still cocoa is just weird!
The whole idea of message passing is different to the GUI programing I've done in the past where controls have event handlers assigned to them, I know in the end the effect is the same but I still think in terms of event handlers and not messages.
All this said I'm not going to give us this time, I've love my mac and as a programer I have to conquer cocoa (try saying that fast).
The mac is home to some of the coolest programs and programers is the world, so I just can't be left out of that!
|