4 ms·
I'm one. Coincidentally, I'll also be starting to learn how to program tomorrow. I'll be learning C from K&R. I wish you the best of luck with Python.
by djb 19y ago
I'm one. Coincidentally, I'll also be starting to learn how to program tomorrow. I'll be learning C from K&R. I wish you the best of luck with Python.
- hga 19y agoA warning or two on C and K&R: If you hit a brick wall when you get to the chapter on pointers and arrays, don't panic. That's perhaps the first relatively hard thing to learn in C, it may take you a little while to grok it. And I get the impression that K&R doesn't teach it well; I myself read the Lions notes to "get it" (_Lions' Commentary on Unix_, ISBN 1573980137, a critical 1977 book with the UNIX Version 6 source code and excellent commentary). Now of course there are many more good expositions on this and the other harder parts of C.
- a13x 19y agoI found this http://www.eskimo.com/~scs/cclass/cclass.html http://www.eskimo.com/~scs/cclass/cclass.html a useful, lighter, accompaniment to K&R when first learning C. Good luck. C is a great language for, er, implementing higher-level languages in ;-.
- timr 19y agoOh, 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.
- dfranke 19y agoC 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.
- djb 19y agoThanks 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.
- comatose_kid 19y agoK&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.