Code Review in Agile Teams – part II

So now, many of you are convinced that code review is valuable and would like to give it a try more seriously. Or perhaps, you succeeded in introducing code review in your team, but still struggle to get it adopted company-wide.
Let’s discuss such aspects of code review.

In the first installment I explained how code review relates to agile development practices, especially when you have distributed teams, changing personnel and the a need for cross-team coordination.
Ready to try adopting code review within your team or across your organisation? Read on.

Misconceptions

Firstly one needs to clearly understand what code review can and can’t do for your team.
Code review is not:

Starting With Code Reviews

How do you convince decision makers in your organization to adopt code review? It depends. If they encourage improvements in collaboration, innovation, and continuous improvement for both your code and employees, then introducing code review will be easier (surprisingly it’s not any different than introducing common agile practices like unit testing, refactoring or pair-programming). If your decision makers aren’t as forward-thinking, you may still try to start inside your team – a bottom up approach. When a single team introduces some practice which boosts productivity, morale or product quality, sooner or later other people follow (including bosses who might take credit for their team’s improvements 😉 ).

Increase the chance

OK, you started. How to avoid failure with the adoption? Here are several ideas based on real-world experience:

Measuring the value and adoption of code review …


… is not so easy. You cannot count on collecting reliable and meaningful metrics. Code review is a soft process, involving human beings – very sophisticated and unpredictable agents. Most of the metrics related to code review cannot be quickly and easily derived.
What are the immeasurable benefits? fewer bugs, less future rework and technical debt, improved team morale and cooperation, improved truck factor, and smoother integration between systems.
You cannot expect to derive meaningful metrics by just measuring the activity volume in code review (like number of comments, created reviews, issues found, time spent on reviewing the code, etc.). These simple metrics may however help measure the adoption (and cost) of code review. If you need metrics – go for it. But remember: you were warned!
I am sure you have some lessons learnt too and can share your advice. Please share your comments!
In the third and last instalment I am going to compare pair programming with code review and reveal a few best practices around code review that evolved at Atlassian.


“Fist” picture courtesy of tms. / CC BY-NC-ND 2.0
“Measuring Tape” picture courtesy of aussiegall / CC BY 2.0

Exit mobile version