In our previous blog, we discussed the benefits and basics of Code Reviews. In this blog we discuss the 4 different types of code reviews and when to choose which type. Each has its benefits and weaknesses depending on your teams’ specific needs. This blog is the second in a three-part series to help your teams implement and perfect your code review process.
Table of Contents
- Choosing a Code Review Type
- Instant Review
- Asynchronous Review
- Synchronous Review
- Team Review
- Free Ebook Download
Choosing the Correct Review Type
You should choose your review method based on your team’s strengths and weaknesses. This will depend on different factors, that are unique to your organization. Perhaps you have a team spread out over many different time zones. Asynchronous would be a good choice.
Let us look at some examples:
- Asynchronous Review: Suppose you have a team that is spread out over many different time zones. Asynchronous review would be an ideal choice for your team because it allows for flexibility.
- Instant or Synchronous Reviews: are perfect if you have a development team that is fast moving, and responsible for high priority releases.
- Ad Hoc Team Review: In case a developer has made sweeping changes to the code base, then an Ad hoc team CR is beneficial, as it helps to timebox the feedback cycle.
Code Reviews at Indellient
Indellient uses the Asynchronous ‘in-house’ method by default. This is owing largely to the fact that we use GitHub Version Control. The advantage is that the Author and Reviewer are de-coupled. Neither needs to be present at the same time and it allows for parallelization of workstreams. The notes and comments of the review process in GitHub also serve as documentation. This works well for our development structure but is not the only method we utilize.
Let us dig deeper into the 4 types of CR and the reasons why you might choose one over another.
The best time for an instant review:
- When you have a tight deadline
- At least 2 team members have both Developer/Reviewer skills that are similar
Advantages: Using this method, everything is quick, including developing, reviewing, and testing.
Disadvantages: Where this falls flat is documentation. This method can also lead to some sloppy design, as the emphasis is on speed.
The Asynchronous process might be right for you if the following is true:
- Scheduling conflicts discourage person to person meetings.
- Your team is spread out across the globe.
- You already use GitHub.
Advantages: Reviewer and Author are de-coupled so the reviews can be conducted on the Reviewer’s time. It is also self-documenting via GitHub.
Disadvantages: Response time from the Reviewer can be a bottleneck. In addition, without the immediacy of Instant Review or Synchronous Review, the Reviewer might miss important changes if they are not explicitly brought to their attention at the time, by the Author.
A Synchronous Review is perfect for some situations:
- Getting the Reviewer up to speed on the project this can be great with a new or Jr. Developer familiar with the Code
- Optimal when there is a tight deadline or high-priority bug fix
- Any change that simply needs to be implemented promptly
Advantages: This review can be both thorough and fast as long as the Reviewer is closely familiar with the project.
Disadvantages: The side effect of this method is that the Reviewer might approve a change in haste.
Team Reviews are perfect in very specific situations:
- Resourcing is not an issue that allows meetings of three or more
- You can assign different roles in the Reviewer group.
- Ex: someone can take notes, document, and rank the severity of the defects, as they are discussed.
Advantages: More minds equal more In-depth reviews. The team review promotes looking at the code with different perspectives. This can increase the chances of identifying defects. Team Review has the advantage of familiarizing larger groups of people with the code.
Disadvantages: Conversely, some team members might not have the domain knowledge necessary to properly review or not be prepared. This method should be used sparingly, as it is the most demanding on resources, as all team members must block out a common chunk of time.
Next Steps: Improving your Code Reviews
Choosing the right Review type that is right for your development team, will maximize the efficiency of the entire team. Couple that with Best Practise templates and checklists that are tailored to your team.
So far in this code review series, we have discussed the importance of Code Reviews and helped you find a Code Review style for your team. For the next blog, we go into more in-depth examples of how to improve your code reviews in “Performing a Better Code Review”
Performing Better Code Reviews: Free E-Book
We have turned our series of blogs on Code Reviews into a free downloadable E-Book:
- Introducing Code Reviews
- Choosing the Right Type of Code Review (The Four Code Reviews)
- Performing a Better Code Review
- Code Review in Practice (Only in the E-Book)
- Conclusion and References
More About Indellient:
Indellient provides IT Services with expertise in Cloud Services, Application Development, Data & Analytics Solutions, DevOps Services and Training, and Cloud Managed Services. Contact our team for a no-obligation conversation on planning, executing, and maintaining your technical projects.