What can a code review do for me?
Melon believes in the power of collaboration and that’s why we love code reviews. Code reviews help us build better projects and faster for our clients and in this post we are going to look into how we do that.
Before you bring a code review process into your team you need to think about what you want to accomplish with doing code reviews. At Melon, we use code reviews as an opportunity to share knowledge about how the application works through the team and to catch small mistakes or logical errors before they end up in a live environment. It’s been estimated that it costs nearly ten times as much to fix a bug in production than if it’s found during QA. Finding it in code review can save even more cost. For our clients this means higher quality projects at less cost.
Because we want to use code review as a time to share knowledge about how a change is implemented and to catch small errors, that means every change needs to be reviewed and everyone needs to participate in the review process. It can’t be based on seniority because everyone is capable of making human mistakes. Senior devs need their code reviewed by more junior members to catch these issues as well as to demonstrate how the code works. It’s an opportunity to clean up code which might have been overly clever and hard to understand. Junior members need their code reviewed as an opportunity to learn and grow through focused and clean feedback on their work. Having at least two developers look through every change means that there is never just a single person who knows how something works. If there are bugs or improvements that need to be made to this area in the future, there are multiple people who can do the work. With those future changes also going through review, the process of exploring and learning about the code base continues through the lifespan of the project.