Code Reviews
What You'll Learn
Intro to Code Reviews
- My Code Review Journey
One engineer's journey to discovering the value of code reviews. Includes helpful advice for all parties in a code review system: authors, reviewers, and leaders.
Guidance for the Code Author
- Writing pull requests your coworkers might enjoy reading
A Twitter engineer shares advice for getting people to review your code: discuss code changes beforehand, make them small, and describe them clearly.
- The 10 commandments of navigating code reviews
Angie discusses how code review feedback can often lack thoughtfulness, and how to take it in stride.
Guidance for the Code Reviewer
- How to Do Code Reviews Like a Human (Part One)
Michael explains what is a code review and why are they hard, and then covers 8 techniques for how to do them well: Let computers do the boring parts; Settle style arguments with a style guide; Start reviewing immediately; Start high level and work your way down; Be generous with code examples; Never say “you”; Frame feedback as requests, not commands; Tie notes to principles, not opinions
- What to look for in a code review
In Google's internal documentation for code reviews, they cover these categories of what to look for: Design, Functionality, Complexity, Tests, Naming, Comments, Style, Consistency, Documentation, Every Line, Context, & Good Things
- A Guide to Mindful Communication in Code Reviews
Amy offers some tips for both code reviewers and authors on practicing mindful communication to maximize the teaching and learning value of code reviews.
Example Code Review Policies
- GitLab's Code Review Guidelines
Gitlab's code review guidelines for GitLab team members and wider community members to ensure code is effective, understandable, maintainable, and secure.
- Code Review Guidelines
Yelp's code review goals, guidelines and checklists.
- On Code Review
Glen emphasizes that code review should be the top priority for all team members, and offers advice to reviewers and submitters.
Further Reading
- Characteristics of Useful Code Reviews: An Empirical Study at Microsoft
An in-depth, quantitative study on the effectiveness of code reviews.