Conflict Resolution

Make It Reproduce the Bug First

Inspired by Episode 2: The Bug That Wasn’t a Bug

You’re reading a subscriber article on a free read. You have 1 free read left. Subscribe free for the whole archive.

If an assistant jumps straight to a fix, you have no way to know whether it fixed the bug or just changed the code. Reproducing it first turns a guess into a test.

The habit

  1. Ask for a minimal reproduction: the smallest input or test that triggers the failure.
  2. Run it and watch it fail for the reason you expect.
  3. Only then ask for the fix, and run the same reproduction to watch it pass.
  4. Keep the reproduction as a regression test so the bug can’t quietly return.
Before changing any code, write the smallest test that reproduces
this crash, run it, and show me the failing output.
Don't fix anything yet.

Bonus: shrinking a bug to its smallest reproduction often reveals the cause on its own.

More lessons from Episode 2