Code Craft: The Practice of Writing Excellent Code, by Pete Goodliffe.
No Starch Press, ISBN 978-1593271190
This book’s a terrific resource for developers wanting to learn or teach good coding practices. This book is all about how to do software construction the right way. The book will inevitibly suffer from comparisons to McConnell’s Code Complete, Second Edition — that’s a very, very tough shadow to try and get out from.
Code Craft seems to me to stand up to that tough comparison. Goodliffe’s writing style is easy to read, and the points he makes are critical to folks who give a hoot about writing good software. The book’s topics are well thought out, running from defensive coding practices, through the importance of coding standards, solid design, good processes, and a high-level view of methodologies and practices.
The level of detail is generally right on, although on occasion a passing reference is tossed out in a critical context without additional examples. One of these cases would be his blurb to “consider the Cheshire cat/pimpl idiom” without the least discussion of exactly what the heck that is. However, and this is important, in many such cases Goodliffe provides a bibliography citation on such topics, which means you can chase down that reference in some other work. While sometimes annoying, such an approach helps keep the book from being a complete monster — it weighs in at around 580 pages.
I very much liked the on-topic sidebars scattered throughout the book. They show great examples which tie in with the current topic, such as showing when the right time to use defensive programming is (all the time!), or some quick discussion on how to approach licensing your software. I also like the 10,000 Monkeys comics dotting the work. They’re amusing and keep the tone of the book light but still focused.
Code Complete is such a seminal work that Goodliffe’s book will probably have a bit of a tough time making the inroads it deserves simply because McConnell’s work has such a head start. Still, Code Craft is a solid book and highly useful to all developers, and it deserves a place on the bookshelf. (And you should read it, not just have it on your shelf.)