Code reviews are one of the most important parts of the software development process. In the years I've been in the industry I've seen many software development companies who either don't do them, or worst still, think they are waste of time.
So in this article I want to take you through exactly what a code review is, why they are important, and how they can actually save your project time and money!
Code review's are a phase in the software development process where the original developer has completed some work, and then another developer will look over the code and look for things like:
1 - Are there any obvious logic errors in the code? Finding and correcting errors at this stage is relatively inexpensive and tends to reduce the more expensive process of handling, locating, and fixing bugs during later stages of development or after programs are delivered to users or clients.
2 - Looking at the requirements, are all cases fully implemented? This is a very important point as failure to miss even one requirement can have a serious impact across an entire product. So frequent code reviews across many micro-deliveries is a must.
3 - Does the new code conform to existing style guidelines and standards? This is a flaw at many software companies where developers apply their own individual styles and standards. You need to have an in-house set of standards that everyone conforms to, and code reviews are a great way to make sure no-one deviates from that.
We find that this is one of the most critical elements of a code review. No one is an expert in every aspect of modern software engineering so having your experts in each field review code, we believe is critical.
Examples of this are for instance identifying security vulnerabilities, and also things like database and query optimization to make sure your app is as fast as possible.
At TCF Software we run all projects in an agile way but any team can benefit from code reviews regardless of development methodology. Agile teams, however, can realise huge benefits because work is decentralised across the team. No one is the only person who knows a specific part of the code base. Simply put, code reviews help facilitate knowledge sharing across the code base and across the team.
At the heart of all agile teams is a powerful flexibility, which is an ability to take work off the backlog which can be executed by any team member. As a result, teams are better able to swarm around new work because no single person is a bottleneck.
This is actually a critical point as nobody likes to be the sole point of contact on a piece of code. Likewise, nobody wants to dive into a critical piece of code they didn’t write, especially during a production emergency. Code reviews share knowledge across the team so that any team member can take up the reins of an issue. So this makes for a much more robust and flexible development team.
We believe the code review process creates a great culture of feedback and collaboration which makes teams work much better together.
What is does, is it embeds the principles of learning and teaching others into your development process, which is great news for everyone.
It's great for new members of a team to be mentored by more experienced engineers but no matter how junior or senior the developer is it helps to put fresh eyes and different perspectives onto code. The key to this though is having the right team culture where the process is seen as a positive for everyone.
The simple fact is that knowledge knows no bounds! and it by no means should it be seen solely as a mentoring exercise but as a learning process for all.
Sure, they take time. But that time isn't wasted, far from it! If done right, code reviews actually save time in the long run and enable you to leverage the benefits I've talked about in this article.