wordfor

shot·gun de·bug·ging

/ˈʃɑːt.ɡʌn diːˈbʌɡ.ɪŋ/ (SHOT-gun dee-BUG-ing) noun

Programmer folklore

  1. Making many random changes at once in the hope that one of them fixes the bug, without forming a hypothesis. Five config changes later the error was gone, and nobody knew which one had fixed it. Shotgun debugging.

Origin

Recorded in the Jargon File; by analogy with the spread of a shotgun blast.

In practice

Change one thing at a time and predict the result before running it. AI agents shotgun-debug readily; make them state a hypothesis first.

Say to your AI

State one hypothesis for the bug, make the smallest change that tests it, and report the result before trying anything else.

In plain words

  • changing random things until it works
  • trying everything
  • I don't know which change fixed it
  • throwing stuff at the wall

See also rubber duck debugging heisenbug chain of thought

Find similar words