Thursday, December 14, 2006

Best Kept Secrets of Peer Code Review, by Jason Cohen

Best Kept Secrets of Peer Code Review, by Jason Cohen

Code reviews are things that I believe are very important to a software development team. Not just because they can reduce defects before QA or the customer sees them, but because they help promote awareness of the codebase in general and provide critical mentoring opportunities to the team. The main message of this book is that the earlier you can find a bug the cheaper it is it fix, and code reviews are an underrated way of accomplishing this. While I agree this is true, I actually believe the mentoring aspects of reviews are actually more important—teach a man to fish and all that.

While loaded with interesting analysis, one detail rang a bit untrue to me. Cohen considers all items found in a review to be defects, but this is not always true in reality. For instance, asking that a comment be added doesn’t mean the code in question is unintelligible, but sometimes simply an explanation of why something was done (for instance, an API class is not marked final due to customer request). When mentoring, it is common to explain new techniques at review time as well; changing for(int i=0;i<longarray.length;++i) to for(long x: longarray) is not fixing or preventing a bug, but something that often happens as a result of a Java review. I believe this overly-broad interpretation inflates the numbers shown in the charts and tables a bit, but as it errs in favor of code reviews I find it easily excusable.

The author is the founder of Smart Bear Software, a company that not surprisingly has a product (Code Collaborator) that aims to ease the burden of doing code reviews. This certainly explains the focus on reducing the overall cost of bugs at the expense of mentoring—it is aimed at the people that control budgets, not the developers writing code. The self-published nature is also evident with something I expect an editor would have caught: the charts presented in landscape mode are turned on the wrong axis! He does reference Tufte, though, so I’ll assume there is some reason we have to spin the book counter-clockwise instead of clockwise. :)

All in all, this is a pretty interesting book. A lot of analysis and case studies went into it and a clear, convincing case in favor of code reviews is made. It skimps a bit on the mentoring aspects, but as those are probably much harder to quantify it is understandable. If you want to see a detailed look at why code reviews are good for a company, this should be your first stop.

First Sentence:
It was only supposed to take an hour.

Saturday, December 09, 2006

The Protector’s War, by S. M. Stirling

The Protector’s War, by S. M. Stirling

The middle entry of a trilogy is often the weakest. The first book was enjoyable, but the third (which I haven’t yet read) would have to be pretty awful to not make this idiom true. Only two things of any import happen here, which is unfortunate for a novel pushing 600 pages. Much of the book is told in flashback, with the main characters in a bar telling each other what recently happened. The framing device isn’t awful, but as it wasn’t used at all in the first book and only in the middle of this one it sticks painfully out. Even the title, The Protector’s War, was odd, as the war is only foreshadowed and will clearly be the focus of the next novel, A Meeting at Corvallis.

The most jarring thing, though, was that instead of the Oregon setting of the first book, this one opens in a Britain that has survived the Change that destroyed all modern technology fairly well, but it seems the now-King Charles is married to a Icelander with little-to-no explanation as to how or why. I suspected I missed a book somewhere as the events that are hinted at seem fairly well thought out, but some research on the net shows this isn’t so. I did find an appendix from an upcoming series set in this same world that tells not only the back story but ranges into the future as well. At least an abridged version of this tale would have been welcome—especially as it looks to be more interesting than the rambling story that was told here!

First Sentence:
I’ve been here before, John Hordle suddenly realized, his thumb moving over the leather that covered the grip of his bow.

Search This Blog