Ive tried to learn C by working through the books "C for Dummies" and got half way through "C Primer Plus" and have not got the knack for C. Lately Ive heard that K&R is the holy grail for understanding C and all programming in general, but when I read the book it just seems like another C book to me and Im not motivated to work through it. Can anyone explain to me what their "ah ha" moment was when reading K&R and how they realized this book was so much better than others?
my background: Ive been trying to learn how to program in C, C++ and Java for many years, and although I can do simple programs, Ive never gotten over the hump where I can put my ideas into code and create something original.
>>1
Sounds like you need to read a good programming book. K&R doesn't qualify, since it isn't a programming book - it's a C book. This difference might sound like I have nits to pick, but the difference is night and day. K&R will only offer you deeper understanding of C - but that isn't worth shit until you can program decently.
K&R is overrated and has very little to do with modern C programming.
Name:
Anonymous2010-03-29 5:28
My other K&R is a KDR
Name:
Anonymous2010-03-29 7:54
I never actually read programming books. My dad taught me QBasic/Visual Basic and then bits of C++ later on. I was writing simple games in Visual Basic and was very happy with it. Then I moved to Borland C++ and spent a lot of time writing other useless bullshit in it (simple games and educational programs for school). Long time later, after having to write some stuff for embedded linux I found out that C and Sepples are different languages and got enlightened. After few more years of raw C and bits of assembler I got introduced to perl and got enlightened once again (so much that by the time I, following your recommendations, started reading SICP, I understood most of concepts introduced in it).
I have no troubles whatsoever "putting my ideas into code and creating something original". Write programs, don't read books and you'll be fine.
KNR is awesome because people who wrote C wrote that book.
K&R, provided you read it keeping in mind the changes that have happened to C after reading the book, will give you a pretty clear and comprehensive understanding of the C language. It won't teach you any programming at all, and really, who would learn C as their first language these days?
Name:
Anonymous2010-03-29 9:34
well I leanred C with K&R in 2004-1005 I think.
It's not that you read the book and then go "Oh yeah now I know C".
You have to work through and take one lesson after another. There is now "ahha" moment, just work thorugh it repeat until you understand and you're done.
Name:
Anonymous2010-03-29 11:02
>>12 who would learn C as their first language these days?