In the article "the soft side of peer reviews" (soft surface of peer review), Karl wiegers will begin with this high-profile statement:
Note: Karl E. wiegers is a world-renowned software engineering master and is known for its research and practice in the fields of demand, project management, and process improvement. He was a Special Editor and columnist of the IEEE software magazine Editorial Board and the authoritative journal softwaredevelopment. He has worked in Kodak for 18 years and led the process improvement of a large development team. As a productive writer, he won the jolt Productivity Award known as "Software Development Oscar" twice for "software requirements" and "Creating Software Engineering Culture. He also wrote a book "software peer review.
Peer review-one of the most effective tools to improve the quality of software is an activity by people other than the original author of software deliverables to help inspect defects and promote improvement. Peer review methods include review, walk-up, peer table check, and other similar activities. After benefiting from the peer review for nearly 15 years, I will never be willing to work in a team that does not do the peer review.
After vertigo participated in the code review for a period of time, I firmly believe that,Code reviews between peers are the greatest contribution you can make to improving the quality of code.If you haven't conducted code review activities with another developer, you are actually indulging a lot of bugs in your code, they also missed some key opportunities for career skill development. Personally, before I find a colleague to check the code for me, I don't think I have completed the code.
However, you may not believe what I said. McConnell's book code complete provides a lot of evidence for the efficacy of code review. The excerpt is as follows:
Note: Steve McConnell is the chief software engineer of Construx and supervises software engineering implementation in the company. Steve once worked for Microsoft, Boeing, and Seattle. His books include: rapiddevelopment in 1996 and the permanent path of software projects in 1998.
Project0000val guide and Professional Software Development in 2004 ). Due to his outstanding achievements, Steve twice won the excellent shock award of softwaredevelopment magazine (jolt
Excellenceaward ). Steve was also a development leader in the SPC evaluation Professional Edition and a software development Productivity Award (softwaredevelopment)
Productivity Award. In 1998, the reader of Software Development Magazine elected Steve
McConnell is one of the three most influential figures in the software industry, named together with Bill Gates and Linus Torvalds.
...... Isolated software testing has limited efficacy-in terms of average defect discovery rate, unit testing can only reach 25%, functional testing can reach 35%, and integration testing can only reach 45%. In contrast, the average performance of design and code reviews can reach 55% and 60%. The case studies of the review results are very encouraging:
- In a software maintenance organization, before code reviews are introduced, 55% of single-line maintenance code changes are incorrect. After the review was introduced, the error rate was reduced to 2%. If all the code changes are considered, 95% of the code changes will be submitted for the first time after the introduction of the review; before the introduction of the review, the accuracy rate of the first code submission is less than 20%.
- In a software development organization, 11 programs are developed by the same group of people. The first five are not reviewed during the development process, and the last six are reviewed. After all the programs are officially released, the first five programs have an average of 100 errors per 4.5 lines of code, and the last six programs have an average of only 100 errors per 0.82 lines of code. Code review can eliminate more than 80% of errors..
- Antai insurance found 82% errors in the program through code review, so they can reduce development resource investment by 20%.
- The IBM orbit Project (500000 lines of code) uses 11-level reviews. The software is delivered ahead of schedule and the error rate is only about 1% (this ratio is generally acceptable ).
- A 200-member organization at at&t reported that productivity increased by 14% after they introduced code reviews, while Software defects reduced by 90%.
- The NASA's Jet Propulsion Laboratory estimates that the cost of discovering and repairing defects in the early stages is reduced by the number of reviews, saving about $25000 per review.
The only obstacle to code review is to find a distinguished developer and set aside time to do it. Once you start doing this, I believe you will soon find that every minute you spend in the code review will be rewarded ten times!
If your company or organization has just begun a code review, I strongly recommend Karl's book peer reviews insoftware: a practical guide ). Karl's example on his website is also an excellent entry material.