Tuesday, January 25, 2011

Code Reviews

As an engineer coming from Google where every line of code is reviewed by another engineer before it is submitted, I had assumed that there would be a publicly available open source tool to help us facilitate code reviews in a similar fashion outside of the Googleplex. As it turns out, there are very few available and almost all are for doing code reviews post-commit. This includes the code review tool built into Google Code Hosting. Google Code recommends that you submit to a branch and then request a code review of the branch before merging into trunk. While that method certainly works, it's cumbersome and the overhead is too high. What inevitably ends up happening is nobody ends up requesting code reviews and the whole process gets dropped.

In my experience, the only way to make sure code reviews actually happen is to enforce it in your tools. But that's a post for another day. We don't enforce code reviews here at Adku because we don't feel that code reviews should be mandatory just yet for a three person startup, but you can bet that once we get bigger, we will.

Anyway, after hours of searching and experimenting with various tools, we settled on Rietveld which was developed by Guido van Rossum, author of Python and Mondrian. The problem with Rietveld, however, is that it doesn't work out of the box! It is meant to be run on appengine, but only supports Django 1.1 so you have to change your appengine setup to use Django 1.1 and this is not a trivial process. Moreover, if you run Rietveld on appengine, most of your changes will be available publicly with no way to restrict access to your internal team without diving in and modifying Rietveld source code.

In the end, after a bit of troubleshooting, we successfully got Rietveld up and running and even set it up internally to restrict access.

Now that it's up, it is beautiful, works great, and is exactly what we were looking for. Typical use looks something like this
  1. make some local edits
    $ vi my_source_code.py
  2. send the changes to carlos for code review
    $ python rietveld/upload.py --send_mail -r carlos
  3. carlos gets an email that looks like this
    From:
    Date: Thu, Nov 4, 2010 at 11:19 AM
    Subject: better demo (issue24)
    To: carlos@adku.com


    Reviewers: carlos,

    Please review this at http://rietveld:8000/24/

    Affected files:
    ...
    ...
  4. carlos clicks on the link and sees the unsubmitted changes in a web ui with change highlighting, syntax highlighting, and an inline commenting ui
  5. carlos enters a few comments inline with the changes and hits send
  6. i make the changes suggested and re-send the code
  7. he reviews again and hits approve
  8. i submit the pending change in my local client

48 comments:

  1. Reviewboard is also a nice one.
    http://www.reviewboard.org/

    ReplyDelete
  2. What post-commit tools did you find? Most of the ones I've looked at are pre-commit based.

    ReplyDelete
    Replies
    1. What post-commit tools did you find? Most of the ones I've looked at are pre-commit based. sami
      local
      star
      bio
      showing

      Delete
  3. Here we present to introduce to all visitors in this great blog. and thank you for allowing me .

    cara menggugurkan kandungan
    obat aborsi
    tanda tanda kehamilan

    ReplyDelete
  4. Exactly when numerous had just been persuaded that these machines were the best innovations in the field of check getting the money for, the possibility of online check changing was presented. aaa1autotitleloans.com/chicago

    ReplyDelete
  5. Bluehost is an outstanding name and they're one of the organizations you're certain to meet when searching for a web facilitating supplier. A portion of their business ad spot looks pipe dream however in the event that lone the majority of it's wordpress website backups certifiable, that is OK on the grounds that the general bundle appears to be so great.

    ReplyDelete
  6. thanks you the article really helped me. I hope the articles that are made are useful for all of us.

    Cara Mengobati Penyakit Thalasemia
    Cara Mengobati Penyakit Aritmia

    ReplyDelete
  7. Thanks for sharing such a great blog... I am impressed with you taking time to post a nice info.
    Mobile App Development Company | Mobile App Development Company in Mumbai

    ReplyDelete
  8. The author of this post is admirable, it brings a lot of emotion to everyone reading it, let's share it more widely. I enjoyed it, thanks for posting it, I hope this post of yours will be more appreciated by it really excellent.
    Jogo para menino, cá koi mini, friv at school 2019, friv Games for kids online

    ReplyDelete
  9. Save your time with do my homework help in all possible subjects! Original, high quality assignments from top quality writers.

    ReplyDelete
  10. Students find History Research Paper Services as being of great assistance since they are able to complete their history research paper writing services and history essay writing services on time.

    ReplyDelete
  11. Finding the best online history research paper writing services and History Research Paper Services is not easy unless one is keen to establish a professional history assignment writing service provider & history coursework help online.

    ReplyDelete
  12. Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet! If you're looking for the best Things to do in the world, this list has something for everybody! From adventure to culture, food to history .

    ReplyDelete
  13. Psychology coursework writing services are not hard to come across for those in need of Psychology Research Paper Services and psychology assignment writing services.

    ReplyDelete
  14. Broadcast emails like sales, events, announcements, newsletters, and blog posts can be easily sent to your list once you have this type of system in place.best t5 fat burners reviews

    ReplyDelete
  15. That’s a nice article, thank you for a great article. It helped me a lot. Keep it up Must Visit panda klantendienst

    ReplyDelete

  16. Thank you for your sharing. Thanks to this blog I can learn more things. Expand your knowledge and abilities. Actually the article is very practical. Thank you.If you are the one looking for technical help in Roadrunner Email then call us today at Roadrunner Support Number and get connected with our award-winning team of Roadrunner Email. They are capable of resolving the technical bugs and issues.

    Roadrunner Email Not Working
    Change Roadrunner Password
    Reset Roadrunner Password
    TWC Email Not Working
    RR Email Login Problems
    RR Email App Not Working
    Recover Forgot Spectrum Email Password
    Change Spectrum WiFi Password
    Forgot Spectrum WiFi Password

    ReplyDelete
  17. Small Product Packaging Boxes are one of the most demanded packaging solutions. They are used to fulfil various purposes. Our soap boxes are one who fulfill your nends with our fast service.

    ReplyDelete
  18. Thanks for sharing an informative post. I appreciate your hard work. Keep sharing with informative post.
    AT&T is one of the leading internet service providers in the United States and Canada. Apart from the Internet, AT&T also provides an email service to its users. Like any other email account, the AT&T webmail account is also secured by the user ID and password combination. It is obvious that a large number of users Change AT&T Email Password to keeps secure their email account.

    ReplyDelete
  19. Thank you for sharing your article and I hope you will share some more information about this..keep sharing.

    یکی از بهترین کارها برای جلوگیری از مزاحمت حشرات، نصب توری روی پنجره ها و درب هاست. مسلماً جلوگیری از ورود حشرات با توری پنجره چسبی به داخل منزل خیلی راحتتر و بهتر از از بین بردن آن ها با روش های سمپاشی و استفاده از سموم است.
    این روزها اکثر افراد تمایل دارند که مدیریت و کنترل بیشتر کارهایشان را از طریق اینترنت دنبال کنند. اگر دوست دارید تا قیمت توری پنجره و همچنین قیمت نصب توری را بدانید، به شما توصیه می کنیم تا در وب سایت یا اپلیکیشن "خدمت از ما" سفارش نصب توری درب و پنجره را به رایگان ثبت کنید.

    ReplyDelete
  20. bespoke packaging boxes At Bespoke Packaging UK we strongly believe in the interests of bespoke packaging, which has multiple benefits.

    ReplyDelete
  21. سئو (SEO) عبارتست از بهینه سازی سایت برای بهتر دیده شدن توسط موتورهای جستجو. بهترین و جامع ترین تعریف سئو را در این صفحه بخوانید.

    ReplyDelete
  22. Custom Printed Packaging Boxes with Logo in UK | Packaging Republic Get Custom Packaging Boxes with Logo in different sizes and styles at wholesale prices. Packaging Republic offers Custom Packaging Boxes with Free shipping and Free Design..cosmetic packaging | cosmetic packaging

    ReplyDelete
  23. This comment has been removed by the author.

    ReplyDelete
  24. Welldone Information. Thanks for sharing with us.
    Jio Digital Tower is one of the best solutions to install Reliance Jio tower on your land or roof. If you want to set up a Jio Tower but you have no idea How To Install A Jio Tower Don't worry, we will tell you step-by-step solutions for Jio tower installation. To know more details about Jio tower installation, visit the website.

    ReplyDelete
  25. Such an Informative Post. Thanks for sharing with us. Keep sharing again with us.
    Are you looking for a dependable Gear Boxes Manufacturer in India? If that's the case, your quest has come to an end with us. Akshi Engineers Pvt. Ltd. can provide you with a high-quality, precision-engineered parallel helical gearbox that may be used in a variety of applications. With gearbox manufacturer India's goods, you may enhance torque, reduce or raise speed, rotate, reverse, or change the direction of the driveshaft in your industrial solutions. For more information, just call the toll-free number and visit our website.

    ReplyDelete
  26. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post.
    Hi! We are water treatment company in uae Great points made up above! And
    Drinking water Filter in Dubai UAE thanks…
    I think this is one of the most important information for me. And i am glad reading your article. But should remark on few general things…

    ReplyDelete