Getting Past Bare Minimum Code Reviews
Posted
Getting Past Bare Minimum Code Reviews by Adrienne Tacke.
Some of the things I found interesting:
- As reviewers:
- Review code in 25-45 minute focused bursts.
- Don’t be afraid to send back pull requests that are too large to review.
- One study found that apparently the use of “you” at the beginning of a sentence was correlated to a comment being classified as “toxic”.
- Suggest with facts.
- Before asking for a change, ask yourself why you want to make that change.
- Target the code, as presented to you.
- Conventional Comments
- Triple-R Pattern: Request (what you’d like the author to do), Rationale (why the request is warranted) and Result (measurable end state).
- As authors:
- Send small pull requests (e.g. typically under 500 lines of code and less than 20 files changed according to two different studies).
- Couldn’t find the source though, the former is supposed to be from Dragan Stepanović and the latter from Microsoft.
- Provide enough context in the commit message: “When one is writing a letter, he should think that the recipient will make it into a hanging scroll.” - Yamamoto Tsunetomo.
- Imagine you’re going on vacations and you want to put enough context on it so you don’t get called to explain why you’re doing it.
- Do not tie your worth to your code (= “you are not your code”).
- Be your own first reviewer.
- Send small pull requests (e.g. typically under 500 lines of code and less than 20 files changed according to two different studies).