Developer's Reading List, May 22, 2012 The most interesting books of the last month, selected and reviewed by Dr. Dobb's editors.
David Griffiths & Dawn Griffiths
This C tutorial is the most recent title in the quirky "Head First" series from O'Reilly. If you're not familiar with this series, the books have a fun and informal way of passing along information that includes games, pop quizzes, cartoon characters, and humorous commentary. The books are eminently approachable and make even difficult topics enjoyable. (Probably the best book in the series, in my opinion, is the one mentioned specifically by Ward Cunningham in last week's interview: the book on design patterns.)
The challenge for this particular book is that C is just not that hard to learn. It's a small language and once you've gotten past how pointers work and the subtleties of function declaration, there is just not that much to say. This book expands on that small target area by covering various libraries, such as the UNIX networking library. It also includes an Arduino project, including all the hardware details and instructions. In this way, readers gain knowledge both of the language and how to apply it in a variety of settings. Generally, things are well explained; however, every once in a while, the hiness of the presentation gets ahead of clear explanations. For example, in a sidebar explaining position-independent code, the authors write, "Some operating systems use a technique called memory mapping when loading dynamic libraries, which means all code is effectively position independent." This is an exact inversion of the reality: Only because code is position-independent can OSs use memory mapping. In that sidebar, there is no explanation as to why anyone would use position-dependent code making the whole digression rather pointless.
I also found the heavily Linux flavor of the book to be a limitation. Everything is presented using Linux and UNIX conventions. They're back ported to Windows by the recommended use of MinGW, with occasional references to the actual Windows correspondences. But there is no explanation of how to use Visual C++.
A C tutorial is invariably a dicey undertaking, as it will have to live and hope for success in the long shadow of K&R. While this book takes a radically different approach and thereby avoids comparisons, I'm not convinced of the value it ultimately delivers.