One constant in large software development projects is code reviews - letting your peers look at what you've done to make sure you haven't missed anything. It's been called the last defense against brokenness since it represents the last check before your code goes into the common repository and affects the rest of the developers (and sooner or later, your users). And, at least in my experience, the tools available for code review are barely adequate. In the 13+ years I've been doing code reviews (both as reviewer and reviewee), I've used a wide variety of tools, from simple text-based ones like diff and patch to more complex web-based tools that generate dynamic HTML pages with pretty colors indicating what's changed. Although these have gotten better and better at highlighting the changes and allowing you to look at other context in the modified files, they generally don't help at all with the other side of the review process - capturing comments and the discussion around them. That's usually left in email, often one-on-one between the reviewer and the developer - meaning other reviewers miss the context of previous review comments. Or everybody sees the comments, even about code they're not interested in. Also, as a reviewer I really get tired of typing in file names and function names or line numbers before every comment so people know what I'm referring to - I want to focus on the substance of the comments, not how to describe the location of the code I'm talking about.
I've seen a few attempts to address these issues, but the one I've been using lately that seems to have a lot of promise is ReviewBoard. This was developed by VMware's Christian Hammond and David Trowbridge (with help from others), and a number of groups within VMware are now using it (so I've had a chance to use it "in anger"). It's a browser-based online review system, and can be used to look at file diffs, expand out unmodified sections of the file, etc.. In addition, comments are added within the tool itself, and can easily be associated with a given source line (clicking on the line brings up a box to enter the comment). When the reviewer is done with comments, they're "published", and the developer sees them. They then can respond, the reviewer can respond to the response, etc. - and the conversation is all captured within the tool. (It's tied to email as well, so you don't need to keep refreshing your browser to see what's changed.) In addition, one reviewer can see the comments from another reviewer - and add their own comments. The developer can also refresh the changes after updating to address the review comments. The end result is to capture the entire review process in a single place - in a way that's transparent to all participants.
ReviewBoard is built on python and django, and has backends that support CVS, Subversion, Perforce, and Mercurial. It's under an MIT license, so you can look at the code and change it however you want. If you're a developer who works on a project where you do code reviews, I'd suggest checking it out.
Recent Comments