Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Learn 'C' then 'Obj-C'? Or is 'Obj-C' on to its own?

Learn 'C' then 'Obj-C'? Or is 'Obj-C' on to its own?
Thread Tools
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jul 3, 2002, 12:37 PM
 
'search' didn't quite work on this topic.

Subject says it all. Necessary to know 'C' to learn 'Objective-C' ?

tnx
"Last time the French asked for more evidence, it rolled through France with a German flag." - David Letterman
     
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status: Offline
Reply With Quote
Jul 3, 2002, 02:59 PM
 
I think you will benefit greatly if you are familiar with c before you try Obj-c. You don't have to, but I would recommend it.
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
     
Mac Elite
Join Date: Jun 2001
Location: Dundee, Scotland
Status: Offline
Reply With Quote
Jul 3, 2002, 05:09 PM
 
You'll have to learn C first as you won't find a book that explains Objective C in total. They all (so far-as far as I have seen-but I'm willing to be proven wrong) explain what Objective C adds to C but expect you to learn C from another text.

Here's what I'd do.

1. Buy the Cocoa book from O'Reilly. Read about Objective C to get a broad understanding of Objects, Classes and Messages. Perhaps try out an easy example or two.

2. Get a good book on C. Learn about Unix and C and how they interact. Experiment a little until you are comfortable with the basics. Try not to get too wedded to functions, structs and any of the fancy stuff. You won't need it for Cocoa.

3. Return to Objective C. Keep your C book close by and try to apply what you've learned to the Object environment. Experiment with the easy examples and see what C fits into Cocoa.Try out some of the more difficult exaples in the Cocoa book.

Hopefully, if you keep thinking in "objects" even when playing with objectless C, you will be a much better programmer for it.

Cocoa looks fantastic to me. I wish I wasn't so wedded to objectless C. I also wish that Objective C was available in all versions of gcc. Then I could start writing Obj-C CGI's (for Sun and Linux boxes too).

*sniff*

While writing a hack in C might get you a job and may win you respect among the geeks, writing a cool Cocoa app could make you rich but will almost certainly make you popular with sexy ladies... (and not neccesarilly in that order) or perhaps that's just my deluded fantasy..

<small>[ 07-03-2002, 06:17 PM: Message edited by: sambeau ]</small>
     
NeoMac  (op)
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jul 3, 2002, 06:05 PM
 
What 'C' book would you recommend?

I notice Oreilly has a text called 'Practical C'. The reviews seem mixed. Advice?

They don't seem to have any Objective-C books. Will 'Building Cocoa Applications' teach Obj-C?

What about 'C' tools. I'm seeing a lot of Windows tools, no Mac tools. I imagine project builder can handle this. Ya? Just don't tell me I have to buy CodeWarrior.

I have coding experience with PHP and MySQL. So I'm familiar with the concepts of procedural and OOP programming.

<small>[ 07-03-2002, 07:07 PM: Message edited by: NeoMac ]</small>
"Last time the French asked for more evidence, it rolled through France with a German flag." - David Letterman
     
Fresh-Faced Recruit
Join Date: Feb 2002
Location: Toronto, Ontario
Status: Offline
Reply With Quote
Jul 4, 2002, 09:28 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">- posted 07-03-2002 07:05 PM What 'C' book would you recommend? </font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">I would recommend that you goto your local library and take out something like 'C for Dummies' or 'Teach yourself C in 21 Days', dispite the gimmicky titles they are both reasonably good HOWTO books that are quick and easy reads (but not nessesariliy worth owning). After that I would recommmend that you buy 'The C Programming Language' by Brian Kernigan and Dennis Ritchie, this book is generally regarded as the best book on C since its authors are also the creators of the C language.

<small>[ 07-04-2002, 10:32 AM: Message edited by: [Bryan_Koylass] ]</small>
     
Dedicated MacNNer
Join Date: Oct 2000
Status: Offline
Reply With Quote
Jul 4, 2002, 11:42 AM
 
Originally posted by NeoMac:
<strong>What 'C' book would you recommend?
I notice Oreilly has a text called 'Practical C'. The reviews seem mixed. Advice?</strong>

I thought "Practical C++ Programming", by the same author, was a good introduction, so I'd expect the same from his earlier book. However, last time I recommended it, someone else said it was good in its time but outdated.

Since you are familiar with programming, you can't go wrong with the classic, "The C Programming Language" by the authors of the language (Kernighan and Ritchie).

<strong>They don't seem to have any Objective-C books. Will 'Building Cocoa Applications' teach Obj-C?</strong>

Yes! I like it better than the Hillegrass book, "Cocoa Programming for MacOS X", although some say that book is the best. And it is better than "Learning Cocoa", the earlier O'Reilly book.

But, since you are familiar with programming and OOP, why not start with "The Objective-C Programming Language", which is a free download pdf file on the Apple website? (You could order a hard copy from fatbrain.com if you prefer.)

<strong>What about 'C' tools. I'm seeing a lot of Windows tools, no Mac tools. I imagine project builder can handle this. Ya? Just don't tell me I have to buy CodeWarrior. </strong>

Project Builder will definately handle this. Or, if you don't want to worry about the GUI stuff, cc (and c++) from the command line will also support this.
     
NeoMac  (op)
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jul 5, 2002, 07:45 PM
 
Today, purchased "The C Programming Language" for $40! Highway robbery.

But it's good. I like it.
"Last time the French asked for more evidence, it rolled through France with a German flag." - David Letterman
     
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status: Offline
Reply With Quote
Jul 12, 2002, 03:53 AM
 
excellent advice, sambeau.
All words are lies. Including these ones.
     
Addicted to MacNN
Join Date: Mar 2001
Location: Seattle, WA
Status: Offline
Reply With Quote
Jul 13, 2002, 12:56 AM
 
dont' forget to USE THE WEB!!

It's a very valuable tool, and is full of examples and help on this sort of stuff.

Good luck!
The spirit of resistance to government is so valuable on certain occasions, that I wish it always to be kept alive.
- Thomas Jefferson, 1787
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jul 14, 2002, 07:35 AM
 
I learned C in a highly non-recommended way My parents, knowing vaguely that I was interested in programming, gave me a copy of "CodeWarror Learning Edition" for my birthday (5.0 I believe). Included were various PDF "books", such as "Learning C for the Macintosh" by Somebody Somesurname. It was rather good, and I went through it faithfully doing most of the exercises, getting to a basic level of knowledge (even a vague understanding of pointers).. and then forgot about it for a while.

Fast forward: The Future, which is now the past. I'd been playing MUDs for a while.. and me and a friend wanted to run our own. We didn't feel up to the task of writing one from scratch, so we (read: I, since he was a VB user) decided to base it on CircleMUD, as so many had before us. PandaMUD, as it was to be known, became my playground. Cheerfully disregarding the numerous specific warnings that YOU SHOULD NOT ATTEMPT TO LEARN C AS YOU GO ALONG, YOU SHOULD HAVE A STRONG KNOWLEDGE OF C BEFORE ATTEMPTING TO MODIFY THIS CODE, etc, I learnt C as I went along over the next several months by hacking away at CircleMUD's code. I actually managed to keep it compiling, running, and relatively bug-free for quite a lot of the time, and it was eventually unrecognisable under the weight of changes (Who needs "levels"?) and new/different features. While never finished, it was a lot of fun, and I wouldn't recommend it to anyone else unless they're utterly insane.

Learning the syntax of a struct declaration by trial and error works, but I'm sure there are better ways of doing it.
[vash:~] banana% killall killall
Terminated
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jul 14, 2002, 11:56 PM
 
Like everyone else I think learning C would be the best thing... A bunch of procedural programming is necessary IMHO lest you start modularizing the daylights out of everything and end up with a fully modularized, compatible, reusable and totally non-functional program. <img border="0" title="" alt="[Wink]" src="wink.gif" />

The best C guides I've told people about in the past have been on the web, you may want to start there.

Have fun.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:57 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2