Positive Impact of Code Reviews

Everyone understands the importance of code reviews and in general developer community has accepted the immense value code reviews add for code quality.

I want to look at the people aspects of code reviews and share my observations and tips. Junior engineers, senior engineers, and managers all benefit from code reviews.

Junior Engineers

Whenever someone is reviewing your code, treat this as an opportunity to learn. I believe code reviews are among the biggest source of learning for engineers. By the time you send a code for review, it already works; any comments from here are meant to make you a better developer.

Coding best practices, new tools, performance, security syntactic sugar, impact area of changes, more useful unit tests. You name it and code review comments would cover it.

My advice to junior engineers is to be open to learning and feedback. Ask questions, ask for references, and further reading when you get advice.

When reviewing code, you can learn more about your system, design patterns, interfaces, system boundaries, and many advanced topics. Look at code and pull requests from people who are considered best in your company for an accelerated understanding of this craft.

Senior Engineers

How do you learn new tricks and emerging best practices when you are the senior-most person in the team? I recommend that you follow expert blogs, follow open source pull requests, and HackerNews. But reviewing code from junior engineers can give you some equally great insights too.

Senior engineers should always request their peers and juniors to review their code. This is a candid acceptance of the fact that we all can make mistakes- a surefire way of bringing humility. You also set the culture that making mistakes is acceptable, repeating them is where you would draw the line.

Senior engineers are continuously thinking about security, performance, and best practices; code reviews are a perfect place to practice these skills.

Managers

Many managers I know move away from code reviews as soon as they move away from writing code. Even if their schedule doesn't allow real-time reviews, I recommend managers to schedule code review time in their calendar.

Here is how managers benefit from doing code reviews:

  1. Managers understand their team better and empathize with them
  2. Managers know about the tech debt their team has taken and can schedule time in a future sprints for removing this debt.
  3. Managers understand about missing best practices and can often spot great discipline in teams.

Code reviews by managers keep them closer to code and team and make them better managers.

Code reviews are a great multi-tool in tech org with a positive impact on team culture, code quality, and tech debt. How have code reviews impacted you as a developer/manager?