Subscribe to
NSLog(); Header Image

“The Whole of C”

From a mailing list I'm on:

…my failure to find a suitable starting point drove me to Java. I've not delved too deep (chewing on OO topics more than anything) but having to tackle the whole of C before beginning on Objective-C seems daunting.

Thing is, "the whole of C" can be learned quite easily in a week. If you're going to learn Java, learning Objective-C is probably just as easy, if not easier. After all, how much C-like stuff do you have to learn for Java anyway?

I make no bones about the fact that I adore Objective-C. Jamie's learning C too - she'll have to learn more than "the basics necessary to move into Obj-C," but she's learning C. It ain't that hard. You don't need to learn the built in C library - learn some variable declaration, a bit about pointers, a bit about for loops and control structures (tests, etc.), and you're reading to move to Obj-C. One week.

8 Responses to "“The Whole of C”"

  1. Are there any resources you'd recommend for quickly learning these basics? Books? Internet tutorials? I'm kind of in the same boat. Except I jumped into Objective-C without much previous knowledge of C and I found that I wasn't grasping some things that well.

  2. I have to agree with you here. I know a few languages and I must say that Obj-C was easily the easiest to learn.

    Learning "enough" C is quite easy and can be done in the course of a weekend. Heck, just read the K&R book. It's only like 90 pages last time I checked. I've read longer slashdot threads.

    Seriously though, if you can get even the basics of the K&R book down you will have MORE than enough under your belt to start doing some fairly complex stuff in Cocoa. As an artist with no real formal CS background (other than a useless Pascal course in college) I can say that even idiots can do it if they set their mind to it. Ya' just gotta dig in and not let things get you down when you don't understand pointers and handles the first time.

  3. There's also Practical C Programming published by Oreilly. I like it because it's meant to teach, but they don't dumb anything down like most beginner's programming books. K&R is good too because it just gets to the facts.

    I would reccommend staying away from anything that's dumbed down though. Learning to program isn't that hard, and not being told the full picture creates more fear then it dispels.

  4. The K&R book is a must-read if you're going to do any serious work in a C-based language.

    I picked it up as a reference book for class my sophmore year of college and rarely cracked it open. I started an internship after that school year and my employer told me to read it cover-to-cover. Made a world of difference.

  5. I agree totally--people don't realize it, but I would say learning an OO programming language isn't that hard. Learning how to "think properly" and do good design in an OO programming language is a different thing entirely! I've known how to program in Java since early college, but its only been the past few years that I've really become what I would call a good OO programmer :-).

  6. Yeah, while I agree with all of you, I'd have to say that OO is easy for us, programming minded people. I've been teaching Cocoa for the last couple semesters, as well as C to a couple friends as well as students in the Cocoa class. C comes very easily to them, but OO concepts which I grasped very easily, seem extremely difficult. The primary concept of instances vs classes, is something that we ended up spending a good two to three weeks making sure that everyone understood.

    So, in conclusion, we take OO concepts for granted, but they're not so easy for some people.

    As for the post, I also suggest the K&R book. It's pretty much the best book there is. The things to really know are the concepts, because C is very simple language syntax wise. if clauses, when and for loops, recursion, iteration...with those concepts, and a guide to syntax, you can pretty much learn any functional language. given a couple more (albeit significantly tougher in comparison) concepts, OO isn't that far either.

  7. Phil says: I would reccommend staying away from anything that's dumbed down though. Learning to program isn't that hard

    That really depends on who you are and how your brain is structured. Not everyone learns in the same way (and I'm not even talking about true mental disabilities). Most tutorial books on programming seem to be geared towards one type of brain. The "Head First" series from a O'Reilly is the first true departure I've seen from this rut in a while.

    K&R is what a lot of people recommend, but it's about as stimulating as dirt. There really are other good books on C out there. I feel too many people suggest this one as a knee-jerk reaction. I also like O'Reilly Practical C Programming -- it does a great job of teaching sticky concepts like pointers in a very straightforward and much more visual manner than K&R. Simple C is the best book I've found for the absolute beginner -- uses the type of language most humans are used to hearing.

    In terms of learning Cocoa, see this page at CocoaDevCentral.

    And that's about the fifth time I've pointed people at that page in the last two days. 🙂

    - Scott

  8. learn C in a week?

    I’ve tried to make myself learn a programming language before. When Mac OS X was released, I wanted to learn Cocoa/ObjC. Everything I read at the time suggested that one should start by first learning C… I tried a few...