Note: This is a republication on Substack of the original 2019 post.
Chancellor explores code reviews as fundamental to software engineering teamwork. He argues that as projects grow in complexity, individual programmers must evolve into collaborative engineers, with code reviews serving as the essential unit of collaborative work.
Code reviews function as collaborative editing opportunities, similar to an editor preparing a manuscript for publication. Rather than acting as gatekeepers preventing “bad code,” reviewers should approach the process constructively. Chancellor emphasizes that experience level doesn’t determine review value: “if you don’t understand what is being done in a pull request, probably other people won’t either: ask questions!”
Before coding, engineers should discuss proposed changes with teammates. Work-in-progress pull requests help when difficulties arise. Upon completion, developers should squash commits and write comprehensive commit messages explaining the “why” rather than merely restating code changes.
Effective commit messages include:
Messages should be under 80 characters for the summary line and include dedicated Summary and Test Plan sections.
Reviewers must recognize that submitting code represents vulnerability. Constructive feedback requires clear communication acknowledging that no engineer produces perfect code initially. Reviewees should separate personal identity from their code contributions.
In pull request workflows, repository owners typically merge approved code, signifying shared responsibility for the changes entering the main branch.
The essay emphasizes that code reviews serve multiple essential functions:
Chancellor notes that effective code review requires deliberate cultural cultivation:
The essay identifies several common code review failures:
Chancellor summarizes key practices for effective code reviews:
For Reviewees: - Discuss changes before implementing - Break large changes into reviewable chunks - Write clear commit messages - Respond professionally to feedback - Ask clarifying questions
For Reviewers: - Approach reviews as collaborative editing - Provide specific, actionable feedback - Acknowledge good practices observed - Ask questions to understand intent - Suggest alternatives with reasoning
For Teams: - Establish clear review expectations - Allocate time for thorough reviews - Cultivate psychological safety - Document common patterns - Continuously improve the process
The essay concludes that mastering code reviews represents a crucial transition from individual programming to team software engineering. As projects grow in complexity beyond what individuals can comprehend, effective collaboration through code reviews becomes the primary mechanism for maintaining quality and shared understanding.
Teams that invest in developing strong code review practices build better software, grow stronger engineers, and create more resilient organizations.
Read and subscribe on Substack