Wednesday, April 21, 2010

The Value of Peer Code Reviews

Code Review photo Fellow .Net Users Group members Richie, President Armanda, and I facilitated a Round Table discussion on Peer Code Reviews. In the words of one of the attendees,

“That was one of the best topics and Round Table discussions we have had.”

I agree completely, although I am a little biased because I suggested the topic. The discussion covered the following:

  • reasons for code reviews (best practice, quality, compliance)
  • benefits
  • who to include (and exclude)
  • cultural prerequisites – not to be used in performance evaluations
  • pre-review prep (code standards, guidelines, checklists, individual review/notes)
  • the review itself (frequency, roles, scope, mechanics, tools, demonstration)
  • metrics
  • most common findings
  • software available – code coverage, standard practices compliance (styleCop and fxCop type software), code review itself

In addition to improving the quality of the code under review, almost unanimously the greatest value is that the process makes better developers. It provides a process that facilitates improvement through:

  • self motivation to improve – respect from peers
  • understanding your personal “most likely to miss” types of bugs or coding practices
  • coaching, teaching, and mentoring from other team members
  • understanding the expectations of your programming and testing responsibilities

Additional related resources:

SmartBear Software - Best Practices for Peer Code Review

Roiy Zysman's Code Review Checklist (or how to avoid the code review reaper..)

Charles Vas's Code Review Checklist

Photo attribution: / CC BY-SA 2.0