Comments (1)
Goals
Code review is about making software more efficient and improving bus factor. It's also about building community and establishing empathy with one's fellow developers.
To this end, we should shape code review practices such that people come out of a code review with:
- A feeling that they have learned or taught something about how to engineer software better;
- A feeling that they have strengthened a relationship with at least one fellow developer, contributing to an atmosphere of camaraderie and support;
- A feeling that they have contributed something meaningful to the software project in a timely manner.
Best Practices
- Prefer to review less than 200-400 lines of code at a time.
- Pair programming, in which the engineer less experienced with the codebase "drives" and the more experienced engineer "navigates", is an acceptable alternative to asynchronous code review.
- Synchronous code review via videoconferencing is an acceptable alternative to asychronous, text-based code review.
- When synchronously pair programming or code reviewing, consider making multiple commits during the process so that your learning process is documented.
- If you spot only a few trivial errors that you can easily fix yourself, consider merging the PR, fixing the errors yourself in a separate commit, and linking to said commit in the PR's comments. Be sure to encourage the contributor to look at the commit so they can learn from their mistakes, and offer to answer any questions they have about them.
- Respond to a pull request within 24-48 hours, even if it's just to say that you can't review the code for another couple of days.
- Consider using animated gifs and/or emojis in your comments, especially when thanking a contributor. This helps foster a positive emotional association with code review, as well as building team camaraderie.
References
- 11 proven practices for more effective, efficient peer code review - IBM DeveloperWorks
- On Code Review - David Humphrey's blog
- Adventures in Code Review and Pair Programming - Atul Varma's blog
- The following slide from a presentation on contributor retention that David Eaves gave at the 2014 Portland All-Hands:
from engineering-handbook.
Related Issues (20)
- Write a Chapter: Offline
- Implement assertions in #16 into the master branch as a sample project
- Write a Chapter: Automated Testing HOT 7
- Write "Accessibilty" into the Handbook HOT 1
- Setup dynamic DNS for sendto.mozilla.org
- Create a hosted Paypal form with transparent redirect
- Get SSL for sendto.mozilla.org setup
- Setup monitoring to know when DNS flips for BSD
- Write shared chapter on working w/ designers
- Write a Chapter: "Where we work open" HOT 1
- Write a Chapter: "Front End UI Libraries" HOT 6
- When should we consider using Flux? HOT 4
- ES6
- Explain how Hotfixing works in onboarding/preflight.md
- Document groups and repos used for github in MoFo Dev
- Write [short] chapter on MoFo implementation of git-flow. HOT 10
- Discussion: What are the best "Learning React" resources? HOT 3
- Sisyphus: The Big Batch Wolf HOT 2
- maintainable client-server relationships
- Stub/write the playbook for "large investment projects" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engineering-handbook.