Building Real Software: Don’t Waste Time On Code Reviews

Use static analysis to make reviews more efficient Take advantage of static analysis tools upfront to make reviews more efficient. Theres no excuse not to at least use free tools like Findbugs and PMD for Java to catch common coding bugs and inconsistencies, and sloppy or messy code and dead code before submitting the code to someone else for review. This frees the reviewer up from having to look for micro-problems and bad practices, so they can look for higher-level mistakes instead. But remember that static analysis is only a tool to help with code reviews not a substitute . Static analysis tools cant find functional correctness problems or design inconsistencies or errors of omission, or help you to find a better or simpler way to solve a problem. Wheres the risk? We try to review all code changes. But you can get most of the benefits of code reviews by following the 80:20 rule : focus reviews on high risk code, and high risk changes. High risk code: Plumbing (framework code, security libraries.) Critical business logic and workflows Command and control and root admin functions Safety-critical or performance-critical (especially real-time) sections Code that handles private or sensitive data Old code, code that is complex, code that has been worked on by a lot of different people, code that has had a lot of bugs in the past error prone code High risk changes: Code written by a developer who has just joined the team Big changes Large-scale refactoring (redesign disguised as refactoring) Get the most out of code reviews Code reviews add to the cost of development, and if you dont do them right they can destroy productivity and alienate the team. But they are also an important way to find bugs and for developers to help each other to write better code. So do them right. Dont waste time on meetings and moderators and paper work. Do reviews early and often.
For the original version including any supplementary images or video, visit


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s