Code Review With Codebrag

Being software crafters, my team mates and I always strive to adhere to clean code practices. Solving the business need with the simplest approach possible, as stated in the KISS (Keep It Simple Stupid) principle, creating small functions that does only one thing (Single Responsibility), making the code self documented and easy to understand.

Occasionally rises some new API or component that you didn't know about, or perhaps a better way to write the story your code is telling, and your code must adhere to this new API/way to write the story. There's also the situation where a feature or a bug fix must be implemented in a rush and the developer has to make some tradeoffs. This is where code review comes in.

There are many open source tools for this job, but my team has chosen Codebrag mainly because it supports SVN and it's interface is user friendly.

Using Codebrag

This open source tool is easy to install and configure, basically all you have to do is:

  • Install Git and the JDK 7;
  • Download the latest distribution at;
  • Extract the zip file;
  • Download your repository using Git and put it in the repo directory:
    • For Git repo, just use git clone
    • And for SVN repo, you have to use git svn clone (in my case I had to specify the --username parameter, and the specific revision instead of HEAD, which turned out like this git svn clone --username myuser -r140123
  • Edit the codebrag.conf file, where you can put your repo's username and password, and some app related configuration.
  • Run the codebrag.bat file in case you're using Windows, or for linux, and it is running!

Having done that, enter the app and register your email, username and password. After that, the home page will load with the unreviewed commits. You can register other members by clicking on the invite team members menu and sharing the link it generates with them.

Here's a demonstration of how to review someone else's commit:

Now I have logged in as the reviewed commit's owner, in order to demonstrate how to do a follow-up:


This is it for this tutorial, check out the Codebrag Wiki for more specific information, and the Ruby Rogues 216: RR Code Review Culture With Derek Prior for a great discussion on code review, and stay tuned for more blog posts to come!