culture creating a code review - usenix...a code review culture is useful culture "the set of...
TRANSCRIPT
![Page 2: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/2.jpg)
Code review is useful
![Page 3: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/3.jpg)
Code review providesa means of ensuring code quality
![Page 4: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/4.jpg)
Code review providesa communication platform
![Page 5: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/5.jpg)
Code review providesan opportunity to teach
![Page 6: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/6.jpg)
A code review culture is useful
![Page 7: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/7.jpg)
Culture
"the set of shared attitudes, values,
goals, and practices that characterizes an
institution or organization" - Merriam
Webster
![Page 8: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/8.jpg)
Agenda:
Examine the practices that contribute to a
strong code review culture from the
perspective of...
● Organizations
● Authors
● Reviewers
![Page 9: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/9.jpg)
Organizations
![Page 10: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/10.jpg)
Be intentional about your culture
![Page 11: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/11.jpg)
Be intentional about your culture
by communicating the culture
![Page 12: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/12.jpg)
Be intentional about your culture
by establishing a community of experts
![Page 13: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/13.jpg)
Be intentional about your culture
by developing new experts
![Page 14: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/14.jpg)
Be intentional about your culture
by training code reviewers
![Page 15: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/15.jpg)
Code authors
![Page 16: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/16.jpg)
Make the reviewer's life easier
![Page 17: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/17.jpg)
Make the reviewer's life easier
by communicating context
![Page 18: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/18.jpg)
![Page 19: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/19.jpg)
Photo courtesy of Julia Evans, @b0rk
![Page 20: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/20.jpg)
![Page 21: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/21.jpg)
Make the reviewer's life easier
by making the PR a manageable size
![Page 22: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/22.jpg)
Vertical Slices
● ship the smallest unit of functionality
meaningful to your users
● round trip through your stack
![Page 23: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/23.jpg)
Make the reviewer's life easierby automating the nits
![Page 24: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/24.jpg)
Make the reviewer's life easier
by knowing when to take it offline
![Page 25: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/25.jpg)
Code reviewers
![Page 26: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/26.jpg)
Communicate mutual respect
![Page 27: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/27.jpg)
Communicate mutual respect
by knowing when to take it offline
![Page 28: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/28.jpg)
Communicate mutual respect
by including justification for critique
![Page 29: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/29.jpg)
![Page 30: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/30.jpg)
![Page 31: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/31.jpg)
Communicate mutual respect
by engaging with the author as an equal
![Page 32: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/32.jpg)
![Page 33: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/33.jpg)
![Page 34: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/34.jpg)
Communicate mutual respect
by being as thorough as the PR needs
![Page 35: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/35.jpg)
Reviewing in passesEach pass is a theme, and some questions
to help focus on that theme
![Page 36: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/36.jpg)
Reviewing in passesMake your own. Make a checklist.
![Page 37: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/37.jpg)
Passes to complete every time
If there are red flags on any of these, resolve before adding more commentary.
![Page 38: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/38.jpg)
Sizing up
● What is the general shape of the PR?
● Is the PR the right size?
![Page 39: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/39.jpg)
Context
● What is this PR trying to accomplish?
● Why is this PR trying to accomplish
that?
● Does the PR accomplish what it says?
![Page 40: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/40.jpg)
Relevance
● Is the change made in this PR necessary?
● Does this PR duplicate existing
functionality?
● Are there others that should be aware of
this PR?
![Page 41: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/41.jpg)
Passes for more in-depth review
Do these for more substantial PRs. Pick the ones relevant to the change.
![Page 42: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/42.jpg)
Readability
● Is the change reasonably understandable
by other humans with little/no prior
experience of the code?
● Are any esoteric language features being
used?
![Page 43: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/43.jpg)
Production readiness
● How will we know when this breaks?
● Is there new documentation required by
this change?
● Are there tests that prevent regression?
● Is this change secure?
![Page 44: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/44.jpg)
Naming
● Do names communicate what things do?
● Are the names of things idiomatic to the
language?
● Do names leak implementation details?
![Page 45: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/45.jpg)
Gotchas
● What are the ways in which added or
changed code can break?
● Is this code subject to any common
programming gotchas?
● Is spelling correct and consistent?
![Page 46: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/46.jpg)
Language specific
● Is the code well designed?
● Is the code idiomatic to the language?
● Are new patterns introduced?
● Does the code fall into common pitfalls
for the language?
![Page 47: Culture Creating a Code Review - USENIX...A code review culture is useful Culture "the set of shared attitudes, values, goals, and practices that characterizes an institution or organization"](https://reader036.vdocuments.mx/reader036/viewer/2022070801/5f029d817e708231d40525a1/html5/thumbnails/47.jpg)
Full checklist at:github.com/while1malloc0/code-review-checklist