Wednesday 1 July 2009

Book Review: Code Complete

Back in April, inspired by John Robbins' blogpost about it, I promised I'd read Code Complete and review it here. I finished it last night (I confess I've read one or two other novels in between), but I can't believe it's taken me almost three months. Lest you think I'm some kind of slow reader, I will add at this point that there were also nights when I didn't read at all!
As soon as I finished it I felt like I should pick it up again and start from scratch - it's easy to see why people read it once a year. It's also easy to see why those who have read it suggest that everyone else should read it too - it's chock full (and I mean it's absolutely full at 862 pages plus bibliography and index) of tips, suggestions and methods to enable you to be a better developer.
I loved the checklist at the end of each section that you can apply to your development processes - these are also available (registration required) on the book's website though it's a slight disappointment that they aren't available as a Word or PDF download.

The message of the book is that creating high-quality software doesn't have to cost more and/or take longer than creating low-quality software, and it then lays out tools to help you do that.

It's nice to come across recommendation for things like coding styles and think 'I'm doing that already'. It's also good that the coding examples in the book are done in a variety of languages - I was fully expecting all the samples to be in C and therefore impenetrable to me, however they are done in a mix of C, Java and VB.

What didn't I like? McConnell talks in several places about programming into a language rather than programming in a language, and if I'm honest I'm not qure I entirely got what he means with this. And I found it a bit dry in places, but then I'd expect a book on software engineering written by Matthew Reilly (whose books are faster paced than anything else I've ever read) to be at least a little dry.

And I can already report some success traceable directly to Code Complete; I've tried laying out some code in a class using pseudocode that then forms the comments in the body of the code. And it is definitely a useful technique as I found it did make me think about the structure of the code before writing the code itself. So something to take forward there...

What's next for me? I may read it again in a few months - I suspect it's going to go round all our team first as I have two takers lined up already. In the interim, I have Professional ASP.NET MVC to read. I guess I should also read Writing Secure Code as I haven't read that either!