by rsheridan6 · 17y ago · 0 comments
Books by W. Richard Stevens were old when I was learning, and older now, but they were the best guides to taking it to the next levels. You can pick up a lot of tricks and stylistic pointers from him while learning about UNIX features and networking. Maybe somebody will chime in with a more up-to-date resource that does the same thing.
This is an odd little book. It's frequently mistaken for an introductory programming book, which inevitably leads to frustration. It's not a good way to learn how to program; it expects that you're already familiar with machine architecture, assembly language, compilers, and at least one other high-level language.
It's not even a very good way to learn C. The idioms and best-practices for C programming have evolved substantially, even since the second edition was published, and some of the code samples look a bit dated.
As the parent said, you'll appreciate C only if you learn about machine architecture and Unix. Diving into a large codebase will get you acquainted with "modern" C.
I've found the book C Traps and Pitfalls to be the book to get you to think like a C programmer. The C Puzzle Book is pretty good for exercises, and Expert C Programming does a good job exposing the ugly side of C.
From there I learned by contributing to open source projects.
Not saying K&R is the best way, but it's not so opaque that a beginner with zero knowledge of C (or even programming) can't pick it up and learn if they're motivated to learn it.
For whatever reason K&R was a perfect storm of comprehension for me, and I came away actually knowing how to read and even sort of write C (and knowing how to search the Internet, pre-Google, or ask reasonably smart questions on the mailing list or IRC channel of the software I was working with, for answers to the harder questions). I failed miserably with every other book on the subject.
This is key advice. Understand hardware first and pointers are obvious, don't and they are (apparently) confounding.