Wednesday, March 18, 2009

The elusive program bug

Some bugs can drive a programmer crazy by its unpredictability and complexity. These bugs have been named after famous scientists who discovered laws that seem to be false, but are actually true.

Heisenbug named after the famous German theoretical physicist who discovered the Heisenberg uncertainty principle. The Heisenbug is a type of computer bug that alters its behavior when it’s tried to be analyzed.

Ex: An example of Heisenbug is a bug that behaves differently in debug mode and compile mode.

Bohrbug named after Neils Bohr, the Danish physicist who made fundamental contributions to understanding the atomic structure. The Bohrbug is a type of computer bug that manifests itself consistently under well-defined set of conditions. Although a Bohrbug can be easily caught, it might be elusive when its present in rarely executed parts of the code.

Ex: A rare condition that is executed only in an exceptional condition may have a very simple logical bug, which does not manifest itself until the exceptional case is encountered.

Mandelbug named after Benoit B. Mandelbrot, a French mathematician famous for his work in fractal geometry. Mandelbugs are computer bugs that are so complex, that they appear to be chaotic.

Ex: A bug that is occurring due to some variable component like the hardware, Operating system, other applications etc, but appears to be a simple logical bug.

Schroedinbug named after Erwin Schrodinger an Austrian theoretical physicist famous for his contributions to Quantum physics. An Schroedinbug manifests itself when the program is analysed to realise that the program is not working as it was designed to. However, the program might have been used effectively due to some other error committed by the user or environment.

Ex: A program that’s actually designed to accept capital alphabets, which has a bug that accepts small letter alphabets. The program stops to work after the users realise that the program is not supposed to accept small letter alphabets. (Note: The program was working while accepting small letter alphabets as all the users were using small letter alphabets leading to the program to work as if all alphabets had been entered in capitals.)

Bosebug named after Satyendra Nath Bose, an Indian physicist famous for his work in Bose-Einstein statistics. A Bosebug commonly known as a statistical bug is a type of bug that manifests itself only when analyzed from a statistical point of view over a considerable duration of time.

Ex: A program that’s supposed to generate random numbers may not actually be producing random numbers from a statistical point of view. Although such bugs may not affect the program in a single run, can create major problems in the long run.

No comments: