The Complete History and Types of Bugs in Computer Programs

The Complete History and Types of Bugs in Computer Programs

[[121747]]

Jim Gray, an American computer scientist and Turing Award winner, first proposed the types of program bugs in his famous paper "Why do computers stop and what can be done about it?", such as Bohr bugs, Heisenbugs, and other bugs named after famous scientists. Later, more bug types appeared. Now, let's take a look at what bug types they are.

[[121748]]

Jim Gray, American computer scientist and Turing Award winner

Bohr bug

Most of the bugs we encounter are reproducible. These bugs are collectively called Bohr bugs. They are named after Niels Bohr, the famous Danish physicist and Nobel laureate. Bohr first proposed the concept of a simple, easy-to-understand atomic model in 1913. In Bohr's model, the path and momentum of electrons in atoms are predictable. In the same way, Bohr bugs are also predictable. If you run the software under the same conditions, you can make the bugs appear again. For example, if the program crashes on a NullPointerException, you can easily make them reappear with the same input conditions.

[[121749]]

Niels Bohr, famous Danish physicist and Nobel laureate

Heisenbug

All experienced programmers have encountered this situation: a bug crashes the program, but when the program is restarted, the bug disappears. No matter how much time and effort you spend trying to reproduce the bug, the bug just disappears. Such bugs are called Heisenbugs, named after Werner Heisenberg, a German physicist, the founder of quantum mechanics, and a representative figure of the "Copenhagen School", alluding to his famous "uncertainty principle" (also known as the "Heisenberg uncertainty principle"). According to his theory, at a given point in time, the position of an electron cannot be determined, and its trajectory cannot be tracked. When you debug, detect, and isolate a bug, your actions cause the bug to change its behavior. These bugs are called Heisenbugs. This is possible, for example, if you use uninitialized variables, which will cause a bug to appear. However, when you try to debug the program, the program does not have any abnormalities, because many debugging tools automatically initialize variables to 0, so these bugs will not reappear.

[[121750]]

Werner Heisenberg, German physicist, founder of quantum mechanics, and representative of the "Copenhagen School"

Mandelbug

When the causes of bugs are too complex to understand, and the occurrence of bugs becomes irregular, these are called Mandelbrot bugs. They are named after Benoît Mandelbrot, the father of fractal geometry. For example, bugs caused by task scheduling in operating systems are Mandelbrot bugs.

[[121751]]

Benoit Mandelbrot, the father of fractal geometry

Schroedinger bug

Sometimes, a program can run, but when you look at its code, you find that there is a bug or some problem in it, and the program cannot run under such a bug at all. But when you run the program again, the bug suddenly works and the program crashes! Although it sounds weird, such bugs do exist and are called Schroedinger bugs. It is named after Erwin Schrödinger, an Austrian theoretical physicist and the founder of quantum mechanics. It implies Schroedinger's famous Schroedinger's cat thought experiment. In quantum mechanics, particles like atoms can exist in two or more quantum states, but Schroedinger believed that in more typical objects, such as a cat - made up of many atoms - it is impossible to exist in two states. He proposed a thought experiment: put a cat, a glass flask filled with hydrogen cyanide gas and a radioactive nucleus into a closed box. When the monitor in the box detects a decaying particle, it will break the flask and kill the cat. According to the Copenhagen interpretation of quantum mechanics, after a while the cat will be in a superposition of being both alive and dead. However, if the experimenter looks inside the box, he will see either a live cat or a dead cat, not a cat that is both alive and dead at the same time. In quantum physics, this is called a superposition state: the cat is both alive and dead at the same time.

[[121752]]

Erwin Schrödinger, Austrian theoretical physicist and founder of quantum mechanics

Back to our bug, because you found this problem in the code, you changed the output of the program - the program either continues to run or crashes. So, this kind of bug is called Schroedinger bug.

There are several other types of bugs not listed here, such as "aging-related bugs" - bugs that appear only after the program has been running for a long time.

<<:  Hammer cuts prices, is sentiment bankrupt?

>>:  Statistical analysis of mobile game players’ payment behavior in 2014

Recommend

Is there only gas on a gas planet? If we want to land on Jupiter, can we do it?

There are eight planets in the solar system we li...

How to go out if you can’t buy N95? Try DIY a cotton mask

Flannel, the N95 of the textile industry. Written...

The world's largest gambling city: I advise you not to gamble

today Let's go to Las Vegas, known as the &qu...

There is no true love in capital marriages. Three stories about Didi

Due to conflicts of interest, I cannot name some ...

Penguins may be the first bird you know.

Penguins may be the first bird you know, in carto...

Learn the complete set of CET-4 and CET-6 grammar from easy to difficult

Course Description The complete video course cons...

US mobile game market survey: middle-aged men are most willing to spend money

On October 17, Everyplay, a mobile game company u...

Yogurt, vinegar, honey water, do these hangover remedies really work?

Can I practice drinking if I can’t drink well? Ma...

Will VR become the next smart TV?

[[161223]] At the end of 2015, VR seemed to have ...

On the seventh day of the Lunar New Year, good luck in starting work!

One, two, three, four, five, six, seven, Today is...

6 Chinese astronauts meet in space!

According to the China Manned Space Engineering O...