Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh, dear god...don't learn how to program from K&R!

Aside from K&R being a bad first-time instructional book, C is just a bad choice of a first-time language. Most CS departments start freshmen with Java, these days (hell...back in my day, most new programmers started with Basic or Pascal, before moving into the ugly world of C.)

If at all possible, learn a scripting language first. Learn Python. Learn Perl. Learn Javascript. All are more productive and fun for first-timers than C. Compared to C, they're all ultra-expressive and ultra-friendly, and you will have an easier time understanding the why of programming, since you won't be as distracted with the details of the how.



K&R is a great book to learn C from. It is short, the authors are programming greats, and as a bonus you get to learn a little about how the Unix programming model works.

And just to be devil's advocate, C is a fine first language to learn - it is small and encourages you to understand what the machine is doing. C++ on the other hand is not a fun place for beginners to hang out.

Just because most CS depts start freshmen with Java doesn't mean that Java is a great first choice.

I think learning C and Python/Ruby would make for a pretty nice combination.


C maybe isn't the easiest choice of a first language, but I disagree that it's a bad one. No single language will make you a good programmer, because a good programmer needs to be capable of thinking in high-level abstractions and also needs to understand what goes on close to the metal. No language that I know of is good for both of those (Forth comes closest), and C is excellent for the latter.


Thanks for the advice (and thanks to the others who responded to my post). I think I'll still give K&R a shot, possibly with the notes a13x recommended (I haven't had the time to check them out yet), because I don't want to buy another book right now. If I find that I'm not getting excited about programming or not learning well from K&R, I'll switch to Python.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: