Gist: A Suitable Tool For Collaborative Online Code Reviews?

Doing code reviews is an extremely useful practice where you can learn a ton of things. Prerequisite: being open-minded and ready to share your code, accept and learn from criticism ;).

Today I was searching for some suitable tool for doing code reviews online. Of course, doing reviews live with your mate beside you would be much more valuable. Voice is still the most efficient communication medium. Here some tools that came to my mind:

Google Wave - Amazing technology, impressive real-time collaboration, nice inline comments, but ... outdated, not being developed further. Therefore, it isn't really suited as a host for doing collaborative code reviews, although the technology is provided for free by I could imagine that one could build a nice real-time code review tool on top of that.

GDocs - Google Docs would be the other real-time alternative to Wave. It is online, can be shared with others (even if they don't have a Google Account) and you can even make documents just privately visible which you may often need when sharing more sensitive code parts. But still, it is too much a word processor than suitable code editor (i.e. no syntax highlighting), though the inline commenting mechanism is nice for doing reviews.

Rietveld aka Mondrian aka Google Code Review - Come on, Google as promoter of best practices must have something in that direction, right? In fact, it has. This article by a Googler describes how he built one when he joined Google. As outlined by the author, internally, Google uses Mondrian for doing code reviews which however cannot be open sourced and made available due to its tied integration with proprietary Google infrastructure. So he coded Rietveld which apparently incorporates many ideas from Mondrian and makes it available on Google App Engine at If you own a Google Apps account, you can also enable this for your company. Pros are for sure that it is targeted for code reviewing, so it has syntax highlighting, diff comparing and so on. But still, I found it quite complex since I have to upload my files to a repository and then expose them through the codereview app. This works well when working on a project with others, directly doing code reviews on the project's repository. It turns out to be quite cumbersome however, if I just want to share some pieces of code with some mate, asking for a quick review.

gist.github - The last tool I came across was Gist. I discovered it while browsing on Github hoping to find something in that direction (since Github is the social coding network). And in fact, I found the tool suitable for me :).
If you don't yet have a github account, go to for creating one. You will then see a menu entry called "Gist".

By clicking on it, Gist will open and you're ready to create your first review request.
You add a filename which will also be used for detecting the code language for syntax highlighting. Then you add a description and paste the code from your source file. You have also the possibility to add more files. Then - as you see from the screenshot - you can create either private or public gists. After publishing you may also add further comments on the gist.

All edits to the file will result in a new version:

The only problem here is that there is no direct "diff" functionality, but rather you can just switch between the different versions which makes identifying changes a bit difficult. But wait :) there is a solution. There exists a Chrome extension (and Firefox as well I guess) for just doing that job: Diff for gist.github. When installing it and going to your gist, you will see that checkboxes appear in front of the different versions as well as a compare button.

Others can then fork the gist and make their edits. The gist owner will then see the different forks / revisions done by others and can directly compare them with his own version to see the changes that have been made.

You can find the gist of this post online here, so you may directly want to check it out. If you know any other free online tools that may be suitable for code reviews, please let me know about them in the comments section.



Your ad here?