Pragmatic code review

Posted by Patrice Neff Mon, 23 Feb 2009

Code reviews are an important instrument to keep the code quality high. There are all kinds of schools on how to do this. For the frontend we made pre-checkin code reviews mandatory for a few core components including the Okapi framework. For all other components and applications, developers can request code reviews if they wish.

For this to work without the developers being annoyed with the process, code reviews must be super-easy. When first starting with code reviews at I tested a ton of tools. But none of them quite fit our workflow. In the end we went for LodgeIt. LodgeIt is “only” a pastebin application. But it works amazingly well for code reviews because it has some advanced functionality such as replying and then diffing the reply to the original.

Most code review tools include a way to automatically send emails to the “right” people to review the code and also allow comments per line. Not so LodgeIt. It doesn’t add yet another communication tool on top of what you already have in your company. You just get a short URL which you can send to whomever it may concern. The frontend team has a Skype channel where these links are posted with a comment of what the change is supposed to do. Suggestions with big code changes are done using the LodgeIt reply functionality and small suggestions can easily be done in the channel itself.

I’m so much in love with this approach that I felt something was missing at my new gig until I finally installed LodgeIt again today. If you want to try it out, there is a public LodgeIt installation.