A while back, I talked about the need for maintaining coding standards and how it simplifies the development process for the whole team. The next step is putting in place a code review process.
Code reviews are very crucial for
Let’s take my current team for example. We are around eleven developers in the team, all producing code which needs to be reviewed. So yeah, that’s a whole lot of code!
Pushing code to production is easy. Anyone can do it, right? What concerns us is the quality of code pieces we are going to deploy.
The code can be completely fine or it can be a piece which makes everything fall apart. To maintain high code quality, we all need to have peer code reviews. This does not mean that the team writes bad code that needs to be checked. We all are on the same team and we have a common goal, that is to deliver the highest quality product. And a code review process makes sure someone on the team catches the errors that somebody else might have missed.
You must be thinking, “Is it worth it”? Absolutely yes.
Not having a code review process integrated into projects can result in big problems. Toyota had to settle a $3 million lawsuit because they did not pay enough attention to code reviews.
There were a lot of reasons why this incident happened and one of the reasons was an absence of a peer code review. After reviewing their source code they found possible bit flips, task deaths that would disable the fail-safes, memory corruption, single-point failures, inadequate protections against stack overflow and buffer overflow, single-fault containment regions, and more. The list of deficiencies in process and product was lengthy.
Obviously then, it makes business sense to make code reviews a critical part of your development process.
We have set a few guidelines around who will be responsible for the code review process:
Maintaining your code review process on GitHub is super easy. We can create new projects on our repo and use it as we want.
Generally, we have four columns, which are:
These are the aspects which we consider while reviewing code:
We regularly review our way of working against a documented process to identify if there are any gaps in our performance. We also look for ways to improve the process and ensure that it’s not a burden/blocker for anyone’s work.
The process is clearly defined and maintained on different platforms, depending on the client and teams involved. We usually use Confluence and highly recommend it to anyone who is reading this post.
We maintain a code feedback sheet where we mention common mistakes we need to avoid. Everyone on the team has access to it and can add points on where we can improve, new techniques to achieve certain functionality, coding patterns to avoid etc.
With a finely tuned code review process in place, development teams can:
That’s about it! There would definitely be things I missed here or certain code review practices that are unique to your team. Leave a comment to let us know.