The Importance of Code Reviews

Developing software solutions is process of mathematical repetition that is done in large teams of experts from a variety of backgrounds. While the team may be well experienced, programmers are still fallible. To create effective software, teams perform Code Reviews to control the amount of mistakes made by checking for consistencies throughout the development process.

Code Review Creates Consistency

Code Review is a phase of the software development process where the authors of the code use a system of review to look over the source code. The source code is normally reviewed by another programmer who inspects the code for mistakes, irregular formatting, or inconsistencies with the System Requirements that may create larger issues with software integration. Code Reviews check for four things:

1. Code issues

2. Consistency in formatting with the overall software design

3. Quality of documentation

4. Consistency with coding standards and project requirements

The purpose of Code Review is to create collective ownership of the software’s progress through knowledge transfer by inspecting the source code as a team. The standardization of code and formatting leads to a more accurate source code as a byproduct, but the overall goal is to keep the team involved in planning the later phases of development.

The Benefits of Code Reviews

Source code that is constantly under review allows developers to learn more reliable techniques and best practices. This leads to robust software that is built from components for seamless integration and functionality. The software also benefits with better documentation, allowing future development teams to build on upgrades and new features easily.

Another benefit of maintaining consistent standards is a source code that is easier for specialists and testers to understand. In Quality Assurance (QA) testing, testers will not only have to check the quality of the code, they will also have to identify issues leading to poor tests. This can lead to persistent, avoidable delays in development due to further testing and reworking.

Although Code Review can provide numerous benefits, it isn’t without its criticism. Some software development companies view Code Review as incompatible with Agile methodologies. This is due to many misunderstandings about how to perform Code Review effectively.

Code Review Methods

Code Review became a standard practice of software development in the 1970s when Michael Fagan began writing a series of journals for IBM on software inspections for Waterfall methodology. Fagan’s methods were known as the Fagan Inspection, where developers participated in a formal meeting with four major steps – initialization, preparation, meeting, and corrections.1

For some development teams, the most frustrating step was the preparation stage where inspectors would study the code individually to find inconsistencies and mistakes. A leading critique of the method was, after the preparation stage, if a meeting was necessary at all.2 After errors were found, the report should be sent directly to the author of the source code for corrections, saving time and effort.

While this mentality has persisted in legacy software development frameworks, teams following Agile methodologies take a more streamlined approach to Code Review.

Code Review in Agile Methodologies

In Agile methodologies, teams commonly come together to discuss potential issues, inspect and question requirements, and transfer knowledge through collaboration. Code Review is built into Agile methodologies, because the methodology prioritizes risk management. Although informal, Agile methodologies are highly effective in performing the principles of Code Review by using feedback throughout coding.

Agile methodologies also employs less obstructive forms of Code Review techniques, such as peer review and peer programming. Peer review consists of programmers exchanging code to be reviewed for feedback on their code and advice on next steps. This is similar to Fagan’s method without formal meetings, using e-mail or simply visiting the programmer for quick solutions. Peer programming is where two programmers work on the same lines of source code, with one programmer as the reader and the other as the author. This technique is used most often to transfer knowledge for highly complex coding or when a special skill is needed.

Code Review is an instrumental component to the efficiency of software development, and has become a defining principle in Agile methodologies. It creates consistency in the source code for better QA testing and software integration for later iterations. By mitigating mistakes, programmers become more efficient in customizing solutions to the specifications of the client.

Tiempo Development uses Agile methodologies to create high-quality software that surpass the expectations of our client’s. We’ve also created the Tiempo Quality System (TQS) as a framework that gives our client’s greater control over the progress of their software. For more information about Tiempo Development’s services to create high-quality software, read our whitepaper about the Tiempo Quality System.

1) Fagan, M. “Design and Code Inspections to Reduce Errors in Program Development.” IBM Systems Journal 15, 3 (1976): 182-211.

2) Jason C. “Four Ways to a Practical Code Review” Methods & Tools.