Thread: K&R 2nd Ed a bad beginner's book? Bad practices? (plan to hop to obj-c next)

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    23

    K&R 2nd Ed a bad beginner's book? Bad practices? (plan to hop to obj-c next)

    I was told by someone on stackoverflow that K&R Edition 2 is outdated and that the "language and its usage (in terms of best practice, etc.) have changed a lot since it was written."

    The problem is, I'm more than half way through the book and exercises. I did a minor c tutorial a few years ago called "c tutorial version 0.042" too.

    What I was planning to do was hop straight into learning xcode, objective c, and cocoa touch to get into some iphone development once I finish K&R. Given what that gentleman told me though, I'm not sure if I should read a more modern beginner's c book or some intermediate c book first, or should I still just hop straight into obj-c?

    I don't want to pick up any bad habits that I will regret later. Suggestions and input would be greatly appreciated.
    Last edited by cb0ardpr0gr^mm3r; 09-13-2014 at 06:12 AM.

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    There isn't a reason to hop to a language. Just learn Objective-C. When you can do stuff in that, you can teach yourself other languages, especially those that belong to the object oriented paradigm. Learning languages in the same paradigm is mostly mastering syntax.
    Last edited by whiteflags; 09-13-2014 at 06:37 AM.

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    161
    Quote Originally Posted by billybob2020 View Post
    The problem is, I'm more than half way through the book and exercises.
    If it is your first C book and you're half way through it then you're doing good (provided you're doing the exercises).
    Many professional programmers started with that book (probably Bill Gates read it too [hey, 3.1 and XP were pretty good])
    I'm reading it now also, after C Primer Plus from Steve Prata which was a good book, and also Sams C programming.
    I would just keep on keepin' on.
    I wouldn't think learning C before objective C is a bad idea after all (from the wiki):
    Objective-C is a thin layer on top of C, and moreover is a strict superset of C; it is possible to compile any C program with an Objective-C compiler

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> hey, 3.1 and XP were pretty good
    No love for 95 and 98?

    <inside joke>Now there were some real OS's with access to ES and DS and full screen mode to boot!</inside joke>

    If you are half way through the book and have been completing the exercises, then completing the book just for the benefit of working the remaining exercises may be beneficial.

    gg

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    23
    I don't want to quote anyone because this is a reply to both the second and third posts. I wasn't being specific enough lol I'm not really debating stopping. What I'm worried about is picking up bad habits from a great, but dated, book, and if so, would it be wise to go through a more modern c book next instead of jumping straight into obj-c?

    I'm looking for someone who has direct expertise in using c professional. I'm not going to be using c directly (yet), but given what I've learned about memory, basic algorithms, and syntax that also works in obj-c, I see understanding c as being beneficial.

    Thanks for the replies.
    Last edited by cb0ardpr0gr^mm3r; 09-13-2014 at 05:53 PM.

  6. #6
    Registered User
    Join Date
    Dec 2009
    Posts
    23
    FloridaJo, Yes, I've been told that this book is actually a difficult book and that a lot of beginners shouldn't start with such an intense book. That made me feel a lot better about having originally rage quit on some of these polish calculator exercises, which I went back to later and completed.

  7. #7
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by billybob2020 View Post
    I'm looking for someone who has direct expertise in using c professional. I'm not going to be using c directly (yet), but given what I've learned about memory, basic algorithms, and syntax that also works in obj-c, I see understanding c as being beneficial.

    Thanks for the replies.
    I disagree with "understanding c as being beneficial". The Language obj-c is OOP language from what little I know. I think you are more likely to pick up bad habits from learning C first.

    I feel knowing C has slowed my learning of C++, alot.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  8. #8
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by stahta01 View Post
    I feel knowing C has slowed my learning of C++, alot.
    That's true for most people who learn C first and later migrate to C++, whether they realise it or not.

    There is a significant difference between "C augmented with a few C++ features" and "good C++ technique". Most people who transition from C to C++ spend an extended period doing the first and believing they are doing the second. For a significant proportion, that "extended period" never ends.

    There are all sorts of reasons for that - a lot of which were good reasons historically, but provide a burden now - i.e. the reasoning is obsolete. Both C and C++ are useful languages, but good technique in one is often not good technique in the other.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  9. #9
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907

    <inside joke>Now there were some real OS's with access to ES and DS and full screen mode to boot!</inside joke>
    [Laughs] That was entertaining. I don't think that they knew that they were trolling.
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner,book recommendation
    By prompt in forum C++ Programming
    Replies: 4
    Last Post: 12-03-2012, 01:44 PM
  2. a C book for a beginner
    By BlaX in forum C Programming
    Replies: 2
    Last Post: 02-22-2008, 08:58 AM
  3. What is the best book for a beginner to learn c++
    By curt22 in forum C++ Programming
    Replies: 19
    Last Post: 07-10-2007, 04:29 PM
  4. Non-Beginner OpenGL book
    By the dead tree in forum Game Programming
    Replies: 4
    Last Post: 12-14-2004, 04:15 PM
  5. A Book on Linux programming for a beginner
    By pritesh in forum Linux Programming
    Replies: 5
    Last Post: 01-10-2002, 05:53 PM

Tags for this Thread