Code review, the practice of asking other developers to read and provide feedback on your work, plays a key role in Agile software development. Code review as a long, formal process that takes place every month or quarter isn’t compatible with Agile’s short development cycles, but the feedback and collaboration in lightweight code reviews support multiple Agile principles.
Providing an opportunity to share knowledge within the team, code reviews help new members get up to speed and avoid one person becoming the critical path for a particular area of the software.
Involving all developers on the team (not just the most senior) in code reviews promotes a culture of shared responsibility, where everyone is invited to contribute to the design and direction of the software.
Creating a sense of ownership of the codebase empowers Agile development teams to collaborate and identify the best solutions to problems.
Helping teams become self-organizing results in more motivated individuals, better results, and a more sustainable way of working than with a top-down approach.
If you’re using a project or workflow management platform to provide a Scrum or Kanban board, consider adding a code review column to the board to remind team members to request a review for each new submission and keep track of how many code reviews are currently pending.
If you’re using a code review tool to record feedback, consider adding a checklist or template to review requests to remind team members of the key things to consider during the review.
Many hosting tools for Git and other version control systems allow you to make code reviews a condition of merging changes into protected branches or trunks. If you have an automated testing and deployment pipeline, you can use the approval to trigger a series of automated builds and tests, as well as deployment to staging or production.
Finally, consider using your code review tool to record metrics relating to code reviews, such as the number of defects discovered, the number of review cycles before approval, the time between reviews being requested and started, and the size or duration of code reviews. You can use the data to demonstrate where reviews add value (for example, if your teammates need convincing or senior management is unsupportive) and to develop guidelines to make your code reviews more effective.
Many software development tools designed for Agile teams can be used to support the code review process. If your team is new to code review, these tools can also help embed the practice.