DEV Community

Asael Shinder
Asael Shinder

Posted on

Read the Reviews on Pull Requests That Are Not Yours

Most people only read code review comments when the comments are about their own code. That is the worst possible moment to learn from them. You are defensive, you want to merge, and you are reading for what you need to fix rather than for why.

There is a better classroom, and it is open all day. Every review your team leaves on everyone else's work.

Pick the two or three most careful reviewers on your team. You probably know who they are already. Once or twice a week, spend twenty minutes reading through pull requests they reviewed, including the ones you had nothing to do with. Read the change, then read what they said about it, then read how the author answered.

You will start seeing things that no style guide writes down. Which kinds of change make the senior people nervous, and which they approve in a minute. Where the team's real standards sit, as opposed to the ones in the wiki. The questions a good reviewer asks about a database migration, and the ones they ask about a new public endpoint. The history behind a rule you have been following without knowing why, explained in a thread from last spring.

Pay particular attention to disagreements. When a reviewer and an author argue politely and one of them changes their mind, you are watching two experienced people reason in public. That is rare, and it is worth more than most talks you could watch.

Keep a short note of patterns. Not every comment. Just the ones that make you think I would not have caught that. After a month you will have a personal checklist built from your own team's real concerns, and your next pull request will arrive with half the likely comments already handled.

A few cautions. Do not jump into old threads to add opinions. Do not treat any one reviewer as the whole truth, since everyone has habits. And do not only read the reviews that went smoothly, because the long, difficult ones teach the most.

After a while something else happens. You start leaving better reviews yourself, because you have absorbed what good ones sound like, without anybody having to teach you.

– Asael Shinder

Top comments (0)