Member-only story
5 Practices To Give Great Code Review Feedback
A great code review boosts code quality and creates a learning environment

For every story, there are always two sides. Last week, we talked about how to prepare a good PR. Today, I’d like to talk about how to perform a good code review.
Code reviews are a very important part of every developer’s day. The two main goals of a code review are to:
- Improve the quality of the codebase.
- Mentor other developers so they can improve their skills.
Additionally, it happens quite often that the reviewer learns something new in the process of performing the code review. Remember to keep an open mind and that the process is a two-way street: a dialogue between the contributor and the reviewer.
Let’s see what we can do to improve how we perform a code review.
1. Read the Title, the Description, and All the References
The first thing to do is to have a very clear context about the PR. Sometimes we want to go fast; we think we already know what our colleague wanted to do, the best way to do it, and we just skim through the description.
However, it is much better to take some time and read the title and description of the PR carefully, especially the latter because we could find all the assumptions that guided our colleague. We could find a more detailed description of the task and perhaps a good description of the main issue they faced when developing it.
This could give us all the information we need to perform a constructive review, taking into consideration all the relevant aspects of it.
2. Close the PR. Sketch a Solution for the Task Yourself
This is the most controversial piece of advice. We should try to figure out a proper solution for the problem by ourselves. After a careful read of the description, we should have the same context as our colleagues. Therefore we have everything we need to solve the problem.
We don’t have to actually write the solution. This would be doing the same task twice, and that’s a waste of time…