Â
Review session slides: Code Review Best Practices (xjm) -- Drupal Developer Days Vienna
Improve your teams' peer code review process, your code maintainability, and your Drupal contributions. Learn from a Drupal core release manager—with over ten years of Drupal core experience—how to give an efficient and effective peer code review.
Peer code reviews are essential, improving maintainability, increasing productivity, and reducing costs. They can also reduce the rate of defects (bugs) introduced into a codebase by as much as 80-90 percent. Most importantly, they build a shared understanding of the application within a team and are an opportunity for developers to mentor each other.
Drupal core's peer code review process has two phases:
1. An initial peer code review cycle with one or more other contributors
2. A final stage of code review by a Drupal core committer (one of the few like xjm who can accept changes into Drupal core's production codebase).
As a result, the core committers are exposed to all the peer review (good and not-so-good) throughout the Drupal core issue queue. This makes committers ideal mentors and subject matter experts on both best practices and pitfalls to avoid.
In this session, you will also discover research and psychological principles on when code review is effective and when it is not. You will learn how structuring your change sets for the reviewer can improve the whole team's code and maintainability. Finally, you will learn about automation and tooling that can help reviewers focus on what's most important.