Making code reviews effective


The use of check lists in medicine is well documented and reviewed. From making sure emergency equipment is on hand to counting swabs and instruments, the use of checklists has reduced mortality and improved patient outcomes.*

Like medicine, software development is heavily dependent on the skill of the practitioner.  Just as medicine has benefited from the use of checklists, so can software development.

One of the areas I have seen significant benefit from, is introducing checklists for developers to use when performing peer reviews of code.  This checklist still heavily relies on the skill of the user, but the prompt to consider certain key areas has resulted in improved maintainability and fewer defects.

Example code review checklist:


[ ] All items specified by the requirement have been implemented.
[ ] Developer testing has been performed on all appropriate browser versions.
[ ] Developer testing has been performed on all appropriate databases.
[ ] Approach is aligned with architectural guidance.
[ ] Organisation coding standards are met.
       [ ] Naming conventions are followed.
       [ ] Cyclomatic complexity is low.
       [ ] Secure coding methods are used.
[ ] Automated test coverage is acceptable.
[ ] All automated tests for the solution/application pass.


* source: http://onlinelibrary.wiley.com/doi/10.1111/aas.12207/abstract

Comments