How to become a better PR reviewer?
I am moving up the ladder so I need to become a good PR reviewer as well.
This is how I do it so that my reviews have been generally appreciated by my team:-
(1) First understand what and how can you contribute to a PR. Three categories IMO (can be more):
- Contextual knowledge: You understand the system context better and can help the author align their code with system context
- Technical knowledge: You understand the programming language, system design and general software engineering principles better and can help the author improve their code
- Styling and formatting: You have a generally accepted perspective (inside the team) on styling and formatting and can help the author align their code with the team's perspective
(2) Once you've identified your strength areas of contribution, walk through the code and share your thoughts on it - focussing on 1 area of contribution at a time. This will segregate what you focus on in 1 read through and lead to higher quality comments.
(3) A popular approach to make your comments easy to work with for the author is to categorise your comments as Nit, Bug/Issue, Suggestion, Minor Suggestion etc. The author can ignore the Nits and Minor Suggestions if they don't have time.
(4) If something is unclear to you because you don't understand it or the author hasn't made it clear enough - ask a question about it. This might help the other reviewers too and also provide an opportunity to the author rethink what they've done.
(5) If a discussion is taking too long on the PR comments, you can recommend moving it to a call or Slack - that is usually faster and also helps avoid the negative optics of too much back and forth on the PR. If this is used judiciously, the authors will truly appreciate your thoughtfulness.
(6) Lastly, try to leave appreciation comments as well if and when you notice something good in a PR. People will like you as a reviewer and be more receptive to getting PRs reviewed from you as well as accepting your suggestions.
Ghumu
Stealth
a year ago
I normally add comments related to tech, syntax, and formatting. However, I have a hard time verifying the logical flow. Even though, I am working on this project from starting. One reason, I can think of, I can't concentrate much in stories-related discussion sessions if I don't have to write code for them.
That might have to do with relatively lower system context. Maybe you don't understand or know all of the business rules well enough to build upon that understanding. If yes, you should spend some.time and effort here.
Category 3 comments are the lowest value adding. Category 2 and Category 1 is great IMO. Once you have enough system context, you will be able to provide good Category 1 suggestions - sometimes combined with a Category 2 tech suggestion.
See more comments