For ten months I shipped changes to a production Rails and React platform, under direct review from the CTO.

A reviewer cannot guess. Each pull request must prove itself. These are the habits that made that possible.

Keep each change small

  • Put one fix in each pull request.
  • Keep the diff small enough to read in one sitting.
  • Ship the code and its tests together. Never defer the tests.
  • Read every line of the diff before you push.

Show it, do not tell it

I put the proof in the pull request itself. For each visible change, I record a before and an after. The before shows the bug. The after shows the feature at work.

I record the mobile view first, because most people use a phone. I test from the real entry point that a user takes, and I drive the real flow, not a mock.

Predict the reviewer’s questions, and record the answers before you ask for review.

Release behind a flag

  1. 01
    Staff first

    Put the feature behind a feature flag, and turn it on for your own team.

  2. 02
    Roll out slowly

    Give it to a small share of users, then more, over several days.

  3. 03
    Stop at the first bug

    Turn the flag off, fix the bug, then start again from zero.

  4. 04
    Clean up

    When everyone has it, remove the flag and the old code in the same piece of work.

What I learned

Proof is part of the work, not an extra. Small changes let one reviewer merge fast. Finish the proof for one pull request before you start the next.