# Following the Yellow Bricked Road?



## Trip (Jul 13, 2002)

I just did some graphics for a new programming book coming out called "The Yellow Brick Road". The book is centered around MacOSX programming and Cocoa, it states that people should learn C, then C++, followed by Objective-C to get the best results from Cocoa. Do you think that's true?

I mean...should I first learn C (already learning) then go to C++ and finally move into Objective-C? Or should I just skip straight into Objective-C? Basically I want to know what I should learn before going right into Cocoa.

Thanks for any help!


----------



## whitesaint (Jul 14, 2002)

When I went into Cocoa all I knew was HTML, then I learned Objective-C and then C.  This is pretty much 50% of the Objective-C language:

[receiver message];

I would say that the majority of Cocoa is the objects (frameworks) that you program with.  I dunno im soo messed up.


----------



## alesh (Jul 15, 2002)

It is not necessary to learn C++ first (I am not entirely sure learning C first is any good either). In any case the biggest leap is from C to C++ or C to Objective-C (procedural to object oriented). Once you have made this leap going between any object oriented language is fairly straight forward. Going from C to C++ is probably harder than going from C to Objective-C.  Objective-C is a much simpler language in terms of syntax, so it would be a waste of time to go from C to C++ and then Objective-C. Unless of course you want to learn C++.

The hardest thing about Cocoa is the APIs. The Objective-C language is quite easy to master, the trick is figuring out how the API's work together to create an entire application, this was the biggest problem for me anyway.


----------



## Ghoser777 (Jul 15, 2002)

I personally think the best path is:

1. Java
2. C
3. Objective-C

Why?  Jave is a pretty straigtforward language, and if you have a reasonable teacher (say you're taking a class), you can learn a lot of the basic of good Object Oriented Design.  C follows naturally, as the syntax is very similiar to Java and really isn't that hard.  I think after getting good with C and object oriented programming, then is the best time to make the jump to Objective-C and memory management issues.

But that's just me (and the path I took)

F-bacher


----------



## Trip (Jul 15, 2002)

Here's what I've done and plan on doin:

1) HTML
2) AppleScript
3) BASIC
4) C
5) Objective C

Anything can come after that, I dunno.
Thanks for all of your advice though!


----------



## kainjow (Jul 15, 2002)

I learned HTML first, attempted C before OS X came out but quit that, then I mastered REALbasic, and now I'm learning Objective-C which I'm doing pretty well with. At first it was tricky because I didn't know how the OOP part of it worked and all, but once you understand OOP, it's easy. But memorizing all those crazy long delegates and stuff it tricky. I still just copy and paste code between apps.


----------



## xaqintosh (Jul 15, 2002)

?  ?


----------



## kainjow (Jul 15, 2002)

Yes I do believe so. Carbon apps. It's not as fun and easy as Objective-C, but sure, I think you can.


----------



## xaqintosh (Jul 15, 2002)

'k I'm learning html right now, then I'm off to C. then Objective-c. and java somewhere along the line. MAYBE C++. I'm getting ahead of myself though


----------



## Captain Code (Jul 15, 2002)

I think that the only reason you would want to learn C++ first is to learn the OOP methods.  There's not a lot of similarities in syntax symalarities IMO between C++ and Objective-C, but the OOP works the same way basically between the 2 languages.


----------



## Trip (Jul 16, 2002)

> _Originally posted by xaqintosh _
> *?  ? *



lol, yup you sure can! Infact: that's one (minor) reason Terminal was involved in OS X.0: I use Terminal to compile/bug check all of my C code.


----------



## skrillerd (Jul 26, 2002)

I think learning C first is always a good move.  The reason Obj-C and Java are so "easy to learn" is that they implement so many shortcuts for you (memory management, for one). If you take these things for granted, you run the risk of making sloppy mistakes. Not so much with Java cause it's fairly idiot-proof, but you can still screw up Obj-C pretty bad if you don't have a firm grasp on what's going on.  

Now, if you just want to write cocoa apps, then don't waste your time. Just jump right in to Obj-C or Java. But if you want to get the big picture, C is the best place to start. 

Also, when you have to deal with the rough stuff first, you appreciate the shortcuts SOOO much more 

Java is the luxury car of programming languages


----------



## simX (Jul 26, 2002)

I would like to point out that HTML is *NOT* a programming language.


----------



## knighthawk (Jul 26, 2002)

I went straight into Objective-C after playing around with REALbasic for about a week.

I read the Apple Documentation for Objective-C: The Language, and I feel that it was one of the better books to explain Object-Oriented programming that I have read.

After about two months, I ran up to me limit on what I could do on my own, and signed up for a C/C++ programming class at the local community college.  The sad thing about the class that I did not learn anything new until the class was over half finished, but it did allow me to refine and solidify some concepts.

The biggest problem that I had in that class (and I was not the only one) was when we were taught about pointers and references.  Objective-C uses these a lot, but you are sort-of isolated from their effects (at least in the beginning level).  However, with C++, if you did not use your pointer correctly, you would screw everything up in your program, and not know what you were doing wrong.  I am mostly referring to dereferencing the pointer or not.

If you are only going to be casually programming, then just go straight into Obj-C.  I would recommend both Aaron Hillgrass's book, and the Cocoa Applications (Step-by-Step) book from O'Reilly.  The combination of these two books will give you a strong foundation in Cocoa and programming in general.


----------



## Trip (Jul 27, 2002)

I am surpised at my results. It might as well just be me and my personality, but my move from C to Obj-C has been the smoothest ride I've ever known. The ride got bumpy for a few *very minor* things (e.x. ":" instead of "=" confused me for a few seconds) but I understood a lot. I had foundation set which helped me focus on the peek of what I was programming.

I'm now glad to say that I have a wide majority of the basics of Obj-C down pat, and with a few more weeks I'll be programming the next big iApp. Just kidding about that part... but hey, I can dream.


----------



## buc99 (Jul 30, 2002)

Anyone wanting an easy to read OO language to get you started?

try Python.

But I do not believe you need to learn any other language to get started in Objective C. However, Python is really easy to learn and interactive and well documented and ...

So for true beginners I would start there.

Good Luck.
SA


----------

