Heisenbug is a whimsical computer programming jargon term for a software bug (glitch) that seems to disappear or alter its behavior when one attempts to study it.

The term is a pun on the name of Werner Heisenberg, the physicist who first asserted the observer effect of quantum mechanics, which states that the act of observing a system inevitably alters its state.

Heisenbugs occur because common attempts to debug a program, such as running it in a debugger, usually modify the code. In general, programs that exhibit time-dependent behavior are vulnerable to time-dependent failures. These could occur during a certain part of a scheduled process, or at special times, such as on leap days or when a process crosses a daylight saving time, day, month, year, or century boundary (as with the Year 2000 problem). Frustrated programmers may humorously blame a heisenbug on the phase of the moon, or (if it has occurred only once) may explain it away as a soft error due to alpha particles or cosmic rays affecting the hardware.

A ‘bohrbug,’ by opposition, is a ‘good, solid bug.’ Like the deterministic Bohr atom model, they don’t change their behavior and are relatively easily detected. A ‘mandelbug’ (named after Benoît Mandelbrot’s fractal) is a bug whose causes are so complex it defies repair, or makes its behavior appear chaotic or even non-deterministic (continually changing direction). A ‘schrödinbug’ (named after Erwin Schrödinger and his thought experiment) is a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place. The term was used in 1985 by Jim Gray, in a paper about software failures (and is sometimes mistakenly attributed to him because of this publication).

One Comment to “Heisenbug”

  1. Reblogged this on hvelleca book review and commented:
    A bug is a virtual fail and its types are of specialists’ interest, like this…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s