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.
Jim Gray, American computer scientist and Turing Award winner Bohr bugMost 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.
Niels Bohr, famous Danish physicist and Nobel laureate HeisenbugAll 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.
Werner Heisenberg, German physicist, founder of quantum mechanics, and representative of the "Copenhagen School" MandelbugWhen 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.
Benoit Mandelbrot, the father of fractal geometry Schroedinger bugSometimes, 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.
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
1. Background and Purpose background Recently, I ...
NetEase has become popular again because of a ser...
According to reports, Alphabet's subsidiary G...
Beijing time, August 30 morning news, according t...
Precision Telemarketing - Low-cost Telemarketing ...
First, let Zhuge help you understand the position...
Nowadays, when it comes to event planning, many p...
【51CTO.com original article】 Activity description...
We know that any economic operation or business m...
In the operation of Internet products , daily act...
Every year, the amount of information obtained fr...
Learn to master: Let friends with no basic knowle...
On a media platform, there will be tens of thousa...
Today we want to share some of the discoveries we...
Is it reasonable to require parents to submit sal...