Initial Impressions of C for Programmers (Deitel)

Posted on December 3, 2014

For Cyber Monday I purchased C for Programmers with an Introduction to C11, by Paul and Harvey Deitel. My overall impressions of this book so far are rather lukewarm, but writing a book “for programmers” is difficult because it’s hard to define what a “programmer” is. I think K&R C would’ve been closer to what I wanted, but it’s an old—though most likely still quite relevant—book by now.

The initial chapters that I’ve skimmed through have focused on how to run and compile C programs, what a terminal is, what Linux is, what an assignment operator does…all things that I think a programmer should know, and nothing that is really about C itself. Perhaps for someone used to Visual Studio their entire career, or a college student still relatively new to programming, such topics would be useful. But for me, lost between all that noise were the important subjects, such as how C compiles and links code separately. As a “programmer”, what I don’t want is a tedious three page example of running a guess-the-number game. A book marketed as “for programmers” should focus on where C differs from common procedural languages; what I want is C for Python and Java Programmers. Such a book would focus on pointers, memory management, headers, security considerations, bit manipulation, and other areas that C and its ilk are known for, instead of devoting pages to operator precedence (which I’m never going to use because if it’s not clear, I would add parentheses).

This probably isn’t an entirely fair assessment. As a Linux user, I’m already fairly comfortable with the command line and a lot of the other background material (like what Linux is) that perhaps most programmers would like to learn about. But I also think most of the tedious preparatory material—setting up compilers, running programs, and so on—should be farmed out to other books or the Internet. A programming language book should focus on the language. This would work better for languages like Python with a single “standard” runtime, where there is a clear central location where a user can find help and documentation on setting up a development environment.

The book has it’s strong suits: the end of each chapter discusses secure programming and specific problems to avoid in C. I would appreciate more of this material, but at least it’s there.

Ultimately, this book’s problem is that it’s audience—“for programmers”—is ill-defined. Different programmers are going to be comfortable with different things and will need to review different subjects. But I feel the first third of the book could have been far more concise.

Out of five stars, this book would get three-and-a-half. My advice? Skim the first third of the book and focus on the topics that make C different. This book could easily have been much more concise or focused much more on topics and techniques unique to C, perhaps merging aspects of an introductory C book and an intermediate Effective C++ style book—that’s what I would ideally want. It’ll get the job done (and I’ll post a full review in a few months’ time), but it could be better.

comments powered by Disqus