|
Design and
code reviews promise to improve software quality, ensure compliance with
standards, and serve as a valuable teaching tool for developers. As with most
practices, there are subtle nuances surrounding how they're performed that can
dramatically affect their value. In some organizations, reviews are a valuable
aspect of the software lifecycle. In others, they are a necessary evil tainted
with political bureaucracy and big egos. Sub-optimal reviews conducted late in
the lifecycle are often misguided due to few objective guidelines that help
guide the review process. When used throughout the development lifecycle, code
and design quality metrics are valuable inputs to the review process.
Reviews Increase Agility Continuous Integration. Test Driven Development. Refactoring. Pair Programming. Agile practices are abundant, and for many teams interested in increasing their agility, valuable energy and resources have been devoted to improving these practices. Because of this, many teams have abandoned reviews while emphasizing other aspects of agility.. But reviews are an important tool in the agile toolkit. {sidebar id=1} A driving principle of the Agile Manifesto is continuous attention to technical excellence. Another is embracing and harnessing change as an opportunity to increase customer advantage. For developers, change often begins and ends with modifications to the source code. A poorly designed application with smelly code is a breeding ground for risk that makes change incredibly difficult, and is the greatest technical inhibitor to increased agility. Effective reviews that emphasize design quality and code cleanliness are an important aspect of increased agility. Reviews done right help ensure continuous attention to technical excellence. Unfortunately, not all reviews are done right. Review Worst Practices Some development teams find reviews a healthy and valuable asset to developers and the project team. Other teams realize little value from their review process. There are numerous causes for painful and ineffective reviews. Some symptoms of ineffective reviews include:
Driving with Metrics - Continuous Review I'm sure many of us have experienced the pain surrounding ineffective code reviews. Fortunately, a good share of the effort put into reviewing code can be accomplished through automation and feedback obtained through source code analysis. Design and code quality metrics help bring greater objectivity, focus, and emphasis to the review process, and alleviate the pain brought on by the review worst practices.
The 20% Review While metrics promise to bring greater objectivity, focus, and emphasis to the review process, maximizing the value of reviews demands that reviews be held early in the development lifecycle. Utilizing tools as part of the build process is a good way to ensure source code is analyzed, but neglecting to take advantage of the feedback provided by the analysis is a common problem. The idea behind the 20% review is simple: once 20% of development is complete, a review should be held. Some teams might find it beneficial to hold the 20% review each iteration. That's certainly effective, but I've found that if teams do a good job using metrics for a continuous review, holding the 20% review for each major system function is sufficient. Often times, major system functions are broken down into smaller stories that span iterations, so ensuring that a strong foundation is built when developing stories in the earlier iterations is a driving force behind the 20% review. The 20% review should focus on initial design and code cleanliness. The metrics discussed above offer wonderful insight into the evolution and growth of the code while the size is still relatively manageable. Holding a review meeting early in development helps align the developer and review team, and offers the review team insight into the code and its structure while the code is relatively small. As such, the 20% review avoids the problem with exclusionary and tree killer reviews. Since the review team and developers are building their relationship early in the lifecycle, it's also less likely that reviews will turn into token reviews because the code is a manageable size and is easier to understand. Since the review committee is involved throughout the lifecycle, developers have time to make code improvements based on feedback provided from the reviews. Waiting until the end of the development lifecycle to perform reviews is a lost opportunity because there is no time remaining for change. Even after the initial 20% review, anyone can gain insight into the evolution of the code by reviewing the metrics on the project dashboard. Any obvious deficiencies in the design or structure of the code can be fixed before the small problem infests the entire code base. The 20% review can also be used as an aid to the developer. For instance, if a developer finds that certain methods have an especially high cyclomatic complexity number, she can ask her peers for advice on how to best simplify the method through refactoring. I've found the 20% review is a critical aspect of an effective review process. Earlier reviews offer the reviewers an opportunity to assess a number of quality metrics, and establish the review process for ongoing development. In cases where development has veered off course, a 20% review offers ample time to make the necessary corrections. In general, I've found that if the first 20% of the code written is of high quality, the emphasis on quality will remain throughout development. The Rest of the Way Once the 20% review is complete, remaining reviews should be scheduled as needed, or upon request by either the developer or the review team. The 80% point has worked well for me. Ideally, the reviewers should maintain awareness of the evolution and growth of the code by monitoring the project dashboard. Using metrics to help drive reviews brings greater objectivity and focus to the review process, and avoids many common problems surrounding reviews. Additionally, reviews early in the lifecycle offer opportunity for improvement while time still permits. Reviews later in the lifecycle prove more productive if earlier reviews are held because the review team is familiar with the code's evolution and growth. The continuous attention to technical excellence will result in increased design and code quality. About the Author Kirk Knoernschild is Senior Technology Strategist at TeamSoft, where he leads based on his firm belief in the pragmatic use of technology. In addition to his work on large development projects, Kirk shares his experiences through courseware development, teaching, writing, and speaking at seminars and conferences. Kirk has provided training to thousands of software professionals, teaching courses on UML, Java J2EE technology, object-oriented development, component based development, software architecture, and software process.
Set as favorite
Bookmark
Email this
Hits: 8245 Comments (0)
|
| Last Updated on Saturday, 09 February 2008 16:35 |
Agile Marketplace - Announcements and Special Offers
Rally Software Extends Agile ALM Platform to Meet the Unique Needs of Global Organizations
Rally Unlimited Edition – Promote Agile practices throughout your organization by providing a complete system-of-record of each product's status, progress and quality across the full idea-to-deployment lifecycle. Sign-up today for your free trial!
iPhone iPad Developers Conference
The iPhone iPad Developers Conference, September 27-29 in San Diego, is the world's premier independent event dedicated to building and marketing apps for Apple's iPhone, iPad and iPod Touch. The format includes 45+ technical classes, workshops and breakout classes. It will also be the first major developer conference after the release of iPhone OS4. CMC subscribers can receive a $100 discount off the Full Event Passport and/or gain free admission to the exhibits (first time registrants only - cannot be combined with other offers) by inserting the code MEDIASPONSOR when prompted on the eRegistration page linked from www.iphonedevcon.com
AgilePalooza - Serious Learning in a Fun Atmosphere
AgilePaloozas are community events sponsored by VersionOne and Agile Journal. These one day conferences provide serious learning in a fun atmosphere. Two tracks are included: Learning Agility and Advancing Agility. Speakers include internationally recognized agile coaches and trainers. The next seminar will be held August 27th in Dallas, TX – use discount code agilejournal and save $20!
Register Here
CollabNet Subversion Edge Improves Governance, Security, Administration
Quickly configure SVN, Apache, and ViewVC with one certified stack, fronted by a powerful UI.
Try our beta version and let us know what you think!


Design and
code reviews promise to improve software quality, ensure compliance with
standards, and serve as a valuable teaching tool for developers. As with most
practices, there are subtle nuances surrounding how they're performed that can
dramatically affect their value. In some organizations, reviews are a valuable
aspect of the software lifecycle. In others, they are a necessary evil tainted
with political bureaucracy and big egos. Sub-optimal reviews conducted late in
the lifecycle are often misguided due to few objective guidelines that help
guide the review process. When used throughout the development lifecycle, code
and design quality metrics are valuable inputs to the review process.

