Current Articles | RSS Feed RSS Feed

Simple Code Reviews with Inline Comments

Posted by Jon Friedman on Tue, May 24, 2011 @ 09:43 AM
 

This comes from Titas Norkunas, in Lithuania.  He is the developer of our code commenting and simple code review features.

How can you use inline comments to do simple code reviews with Assembla?

Optional - Edit the Status values in your ticket workflow:  Though not mandatory, it is a good idea to track exactly what has been or is being reviewed. To do this, go to Tickets > Settings and edit your workflow to add a custom status “Review” or “Under review.”Add Review step to the workflow

    When commiting changes, include a note in the form “review #501” in the commit messages. 

    The status of the ticket will automatically be changed to “Review,” and the ticket will be associated with the changeset.

    When you are ready to do a code review, follow the latest links from the tickets with status “Review” to the changeset.

    When you open the changeset, you will see a list of the changed files, followed by a list of the changed lines of code.  Comment on a line of code by clicking on the line, or leave a general comment using the form at the bottom of the changeset.

      Add comments in the code

         

        Add comments at the bottom

        If the changeset passes the review, change the status of the tickets to “Test” (or whatever is the next phase in your workflow). If the changeset does not pass, the status can be changed back to “Assigned.

          You can see review activity in the Source > Comments tab. 

          There is also a new event type for Code Review in the activity stream.  You can use the sidebar to select code review events, and you can open the "Change alert settings" panel and configure it to send emails about your code.

          Implementation tip - Pairs: When we first started doing code reviews in Assembla, they became a bottleneck because only senior developers had the ability to approve changesets and move them from “Review” to “Test.”  This can cause a lot of delays in a distributed team. We discovered that what works best is assigning a code review buddy for a complete release cycle, and making that person responsible for moving the ticket through review. I believe having component owners could work as well.

          Tags: , ,

          COMMENTS

          Thank you, this is great news!  
           
          I agree with your thoughts on pair programming and other time consuming practices to guarantee quality code.  
           
          The only effective method for code review has been printing in draft paper and working with different colored highlighters. The problem is sharing those results with a distributed team.  
           
          Keep up the good work! 
           
          Felipe

          posted @ Thursday, June 02, 2011 10:01 AM by Felipe


          Comments have been closed for this article.

          Follow Assembla

          twitter facebook youtube linkedin googleplus

          Subscribe by Email

          Your email: