I had a conversation with a developer last week that really surprised me. He told me about his company’s process of getting into a cramped room every week and reviewing a sample of each team member’s code. The team set aside four hours for this activity – from 1:00 to 5:00 in the afternoon. Every Friday.
Code review can be a horrible experience, let’s face it. But code review comes in many forms, from over–the-shoulder reviews, to full-blown meeting reviews, as described above, to tool-based reviews. And they used to require a whole lot of time, getting at least two developers together – if not a whole team – to review code. But peer code review tools that can be done asynchronously change that.
Tool-Based Code Review
Peer code review tools allow developers to communicate with each other on their own time. Depending on the tool, developers can chat in real time or asynchronously. They can make comments about each other’s code. And they can respond to comments others have made about their code whenever they have the time.
In asynchronous code review, the development team doesn’t have to get together in that stuffy room. When their code is ready, they send it off to a team of reviewers. The reviewers receive notification that the code is available for review, and they review the code when they have the time. There can be back-and-forth between author and reviewer as the code is improved before it is merged with the main branch.
Asynchronous reviews work especially well for distributed teams. I spoke with one developer who told me about the benefits for his very distributed team of developers. He works in a small (for his company) team of 23 developers for a large, well known software company. Only six are in the United States – and they are in six different states. The rest are distributed between China and India. His team is able to manage code review asynchronously as a true team. The developers code all day and break when they feel the need, often to review their colleagues’ code. Of course, they are required to review code each day, but they set their own schedule for doing their reviews each day.
Regardless of whether your team is co-located or distributed, tool-based peer code review enables each developer to stay in the zone while coding and to review code at a time they specify.
In the comments section below, feel free to share what you do to encourage teams to do code review to improve team effectiveness….