Benefits of a code review
Filed Under Techniques, Benefits, Review, Improvement, Model, Development, Process, Software | Posted on October 6, 2007
Why would you get a development team to do a code review ? What is in it for them ? It takes time to fit in a code review, and the basic principle could be an affront to a confident developer that his/her code, written with a lot of skill, needs to be reviewed by a peer. However, as we will see, a code review is an important part of the software quality process, and enables catching more problems much earlier when the cost of fixing defects is much less. It may take some effort to get a development team to buy into the code review process, but once the developers start seeing the benefits, they will be easy converts.
It is good to review the objectives of a code review:
* Quality, defect-free software
* Systems that are appropriate and complete meeting requirements
* Software that complies with enterprise coding standards
Now, what are the benefits of the code review process:
- Code reviews get team members involved in different parts of the system than they’re used to. Typically during the development phase, developers do not have much time to figure out the code or design of another part of the project, and code reviews give them a detailed picture of the code of other parts of the project
- Such informal knowledge exchange enables developers to move more readily from one project to another. There’s a smaller learning curve if the developer already has had a role as a reviewer on the new project.
- Reviews also suggest improvements the author could make in the work product
- It seems to work for companies in terms of saving costs by identifying bugs that may or not be found later in the cycle. Companies as diverse as Aetna Insurance Company and AT&T Bell Laboratories have reported increases in coding productivity after introducing inspections
- Reviews can be a valuable mentoring technique. Less experienced developers who have their code reviewed can learn about common gotchas to avoid, inefficiencies, and good coding idioms. Reviews also provide a technique for bringing new developers up to speed with the local coding culture, such as naming conventions and layout style.
- Another benefit is that code reviews encourage consistent coding standards and help ensure that everyone is on the same page. Coding standards may not seem that important, but cleaner code makes it easier for someone else to come in and start working with it. Additionally, coding standards can help prevent common logic errors or other simple mistakes.
- A more obvious benefits is that your team as a whole will create better code. More sets of eyes increases the quality of the code, so your project will have fewer bugs and be easier to maintain over time.
- Increased customer satisfaction: Essentially a byproduct of having lesser bugs due to greater inspection at the coding stage
- Makes for more commenting and better structured code: If a developer knows that the code is to be reviewed by somebody else, soon the developer will start writing code that has more comments and is easier to read
- Improvement in meeting committed schedules: Seems strange, given that you will need to spend more time on code review, but it is a fact that there is more time saved the earlier you find a bug
Leave a Reply