Friday, April 19, 2024
HomeProductsProductivity ToolsIterative Code Review

Iterative Code Review

Summary: This article describes improvements we have introduced into the iterative code review process — the distinctive Review Assistant feature.

This is the fourth article in the series. Learn about the improvements in Review Assistant 2.0 from the previous articles:

1. Code Review Board Re-designed

2. Improved Code Review Comments

3. Reviewing Code from Multiple Repositories in One Review

What is iterative code review?

Iterative code review refers to the situation when a single piece of work is reviewed more than once by the same reviewer.
In fact this is a regular case. None of major changes in code will pass without reviewers comments. They find bugs and faults which an author should fix, and then show the code over again.
The Review Assistant documentation contains more detailed description of the iterative code review.
Not all code review tools support repetitive code inspections within a single review. Review Assistant has been providing this feature since the first release. In Review Assistant 2.0 we have significantly improved this process.

 Improvements in the code review process

Here’s how the review looks after several iterations.

Iterative Code Review
Iterative Code Review

Now let’s consider the innovations in the code review process in more detail.

Review progress for the reviewer

The most important innovation is that a reviewer can track the files they have already reviewed.
Previously a user had to keep this information in mind. If the list of files in a review is too long, it is easy to lose track of what has and what has not been reviewed.
As you can see in the picture, the review progress is defined by two characteristics:

  1. The total number of unread files is shown (3 unread files in the picture).
  2. All unread files are shown in bold.

Automatic positioning to the latest unviewed changes

In the picture above we can see that the author has fixed existing comments, and added a new revision for re-review.

The double slider control above the file list shows the revisions range added to the current review. Slider’s notches allow you to determine an iteration’s number. As we can see, this is the fifth iteration.
In this case the reviewer has reviewed all the files, wrote the comments, and rejected changes. After the author reopens the review, Review Assistant will automatically show to the reviewer the most recent changes made by the author. This means that:

  1. The file list will be filtered to display only those files that were changed during the last iteration.
  2. In case the reviewer compares files, they will see only changes made during the last revisions.
New revision with unviewed changes
New revision with unviewed changes

Replacing the recent revisions in a review

It often happens that the author adds wrong revisions to a review, or frequently leaves out of account the correct ones. In the previous versions of Review Assistant it was impossible to correct this selection mistake after saving a review.

If the problem was detected right after a review creation, the only solution was to delete the review, and add a new one. But if such mistake took place in the second or third iteration — it was a real problem.

In the new version of Review Assistant we have added the possibility to change revisions that are added in the last iterations.

Replace Recent Revisions
Replace Recent Revisions

Start reviewing code

Download our peer code review tool and start reviewing code with Review Assistant for free today.