Debugging Code Review at 3 a.m.

Abstract code gradient artwork

Naming things well saved us more time than any framework migration. We measured first, and the bottleneck was not where anyone expected. The rollback plan should exist before the rollout plan is approved.

What didn’t

Logs answer questions you knew to ask; traces answer the ones you did not. Naming things well saved us more time than any framework migration. Caches are easy to add and surprisingly hard to remove.

We wrote the migration twice: once to learn, once to ship. Logs answer questions you knew to ask; traces answer the ones you did not.

Lessons

If the error message does not say what to do next, it is half an error message. We wrote the migration twice: once to learn, once to ship. Security is mostly about saying no to defaults that were convenient in 2010. Latency percentiles tell a story that averages politely hide.

  • Delete dead code the same week
  • Alert on symptoms, not causes
  • Write the failure mode down before writing code
  • Keep migrations reversible

Most production incidents start as a small assumption nobody wrote down. If the error message does not say what to do next, it is half an error message.

Getting started

Naming things well saved us more time than any framework migration. Logs answer questions you knew to ask; traces answer the ones you did not. We measured first, and the bottleneck was not where anyone expected. We wrote the migration twice: once to learn, once to ship.

Latency percentiles tell a story that averages politely hide. Feature flags are debt with an expiration date you must actually enforce.

We wrote the migration twice: once to learn, once to ship. Our on-call rotation improved the day we deleted half of the alerts.

Comments

4 responses to “Debugging Code Review at 3 a.m.”

  1. Great write-up. The part about the trade-offs was spot on.

  2. Hannah K. Avatar
    Hannah K.

    Could you share more details on the second section?

  3. Interesting perspective. I had the opposite experience, but I see your point.

  4. Shared this with my team, it sparked a good discussion.

Leave a Reply

Your email address will not be published. Required fields are marked *