DEV Community

Cover image for The 3PM code review rule

The 3PM code review rule

Martín Pérez on October 11, 2019

Recently I was giving a talk at a local engineering group about the software practices we do at our team and it did surprise me how many people cam...
Collapse
 
cristinaruth profile image
Cristina Ruth

Great read! 🙂

I implemented a similar process with my team. Daily team code reviews of any work that's in progress.

My reasoning behind it was different though:

  • Share knowledge with the entire team. Knowledge shared among all members of the team empowers the team members to help each other as needed. It also helps all members learn from each other in terms of patterns and code styles.

  • Keep review scope small. Code can change a LOT in just 1 day. So reviewing the code daily helps the team keep up with the context and the scope of the review is smaller than if you were to review a "ready" pull request.

  • Build team trust. Reviewing together and learning how to work with each other opens the door to increase team trust. High team trust = highly performant teams.

Code reviews are a great way to ensure code quality but I love to use them as a tool to build up and enable the team as well. 👍

Collapse
 
mpermar profile image
Martín Pérez

Way to go Cristina. Love your approach.

Collapse
 
avalander profile image
Avalander

We have a similar rule in my team. In the morning, first thing you do before starting/resuming other work is review open pull requests. That way we ensure that our pull requests will be reviewed latest next day in the morning and we don't break focus when people are working on other things.

Collapse
 
maksimov profile image
Stas Maksimov

Smaller teams and use of Slack is what works for us. Every single PR gets attention without any policies.

Collapse
 
thisiszvkh profile image
Zakiah Ismail

That's fantastic! I believe it helps speeding up the review process tremendously. How did you get everyone to be on board for the one-hour review session? Any tips?

Collapse
 
mpermar profile image
Martín Pérez

Never was an issue. I think it's because every two weeks we share team stats and it was pretty obvious that we always rushed at the very end of the sprint and needed some process around this.

One hour is the upper limit. In reality, many times people do reviews outside of that window. The official time allocation forces a notification which is the most valuable thing here. That reminder, calls people to action. Sometimes, people will spend the whole hour, if there is some design to discuss for example. Many times it is just a few minutes because you have tiny things to review and you spend the rest of hour doing something else. And other times there is nothing to do.

At the very end, the point is creating the habit.