Code Complete: An Appreciation
It’s been about 25 years since I first typed 10 PRINT “HELLO”, and in that time I’ve read dozens of books aimed at making me better at creating software. There are several things I want to do with this site, but certainly one of them is to recognize those books that had a particularly strong impact on my professional career.
The first one is Code Complete, by Steve McConnell. It stands out on the shelf because it’s not about learning a new language, tool, or discipline, and it’s not a big picture rethinking of software engineering itself. Instead, it’s a series of presentations of empirical data about specific features of the coding process, as well as very specific examples of how to generate elegant, readable code.
I read this book the summer before I entered a graduate program in Computer Science, in a defensive panic that I didn’t know enough actual programming. As soon as I finished it, I started rewriting my existing programs to align with McConnell’s suggestions, and I’ve never really stopped. In particular, the sections on control structures and layout paint a clear picture of what maintainable software looks like in practice, simply be setting out the principles and demonstrating them example by example.
The book’s influence is all the more amazing because its examples are in langauges (C, Basic, and Pascal) that have not been useful to me professionally. (I had stopped using Pascal by the time I read it, wrote a little Visual Basic since, and probably an even smaller amount of C). The basic ideas, though, are adaptable to any declarative language. There’s a second edition, dated to 2004, that I haven’t read, but which I understand updates the data and examples in the book (the examples now include Java and C#). (Come to think of it, I probably should check it out…).
It’s rather amazing to me that so many of the Amazon reviews of this book still, nearly fifteen years after its original publication, say that there’s no other book that covers this kind of ground.. the kind of pinhole cleanup of code that is so much of the difference between a great program and a mess. I actually think there are one or two other books that cover similar ground, but it’s clear to me that this is a gap in the kind of knowledge about programming that is shared. This book will make you a better programmer.