Heisenbug

conceptual-metaphor PhysicsSoftware Programs

Categories: software-engineering

What It Brings

Heisenberg’s uncertainty principle — the act of measuring a quantum system changes its state — mapped onto bugs that disappear or change behavior when you try to observe them. The name was coined by Jim Gray in 1986, and it captures a genuinely unnerving debugging experience: adding a print statement, attaching a debugger, or enabling logging changes the timing, memory layout, or optimization level enough that the bug vanishes. You cannot observe the defect without disturbing it.

Key structural parallels:

Where It Breaks

Expressions

Origin Story

Jim Gray coined the term in his 1986 paper “Why Do Computers Stop and What Can Be Done About It?” published as a Tandem Computers technical report. Gray distinguished between Bohrbugs (deterministic, like Bohr’s classical atomic model) and Heisenbugs (observation-dependent, like Heisenberg’s uncertainty principle). The terminology spread through systems programming culture and eventually into general software engineering vocabulary.

The physics-bug taxonomy grew organically. Bruce Lindsay is credited with coining “Mandelbug” for bugs with causes so complex they appear chaotic. “Schrodinbug” appears to have emerged from Usenet culture in the late 1980s, entered the Jargon File, and became part of hacker folklore.

References

Related Mappings