Home > Article > Backend Development > About programmers: No life without bugs
I decided to talk about the most famous bug in the world: BUG!
BUG has troubled generations of programmers, whether they are outstanding computer scientists or gods such as Linus Torvalds (the founder of the Linux kernel) and Bill Joy (it is said that he wrote the predecessor of BSD in three days, the author of vi and csh) The same legend, or programmers like you and me, are all targets of bug harassment. BUG is an absolutely fanatical militant with a never-ending desire to fight. It lurks around programmers. It has a pair of bright eyes and can catch you unawares with a surprise attack. And whether you have a frame of steel or a jade body of mutton fat, as long as you are attacked by this insect (if you have watched "The Mummy", you must be deeply impressed by the scarab), you will have to shed three layers of skin, and even worse, it will very You may end up in jail, die, or disappear.
Fatal BUG Incidents in the Software Industry
In fact, tragedies caused by BUGs occur every day. Here we will give a few famous examples.
As a programmer, I think the company that developed the ATM machine should be held responsible, and they should compensate their customers (i.e. banks) for their losses. It was their software BUG that led to this case. But in front of a powerful institution like a bank, an individual's voice is insignificant, and it is difficult to put the two on the same scale. What kind of twists and turns there are in the middle, time has changed, we can no longer consider it. However, as programmers, we still have to be vigilant. In many cases, bugs will bring direct economic losses and serious legal consequences. Although you can argue that you are technically innocent, if you don't kill Boren, Boren will die because of you.
A farce in the reservation number of Smartisan mobile phone
During the National Day holiday in 2014, the 4G version of Smartisan mobile phone appeared on Tmall Mall. The page shows that the phone is expected to be officially launched on October 18, priced at 3,500 yuan. The inventory is said to be 10,000 units. It is said that soon the Tmall mall page showed that the number of reservations exceeded 80,000.
Later, some netizens revealed that the number of reservations for the 4G version of the Smartisan phone was found to be inaccurate from the source code of the page. The number displayed on the page was three times the actual number of reservations, thus once again pushing the Smartphone to the forefront.
Later, Tmall responded positively to this incident. Tmall said that as of October 7, the number of reservation users for the 4G version of Smartphone was 62,682. However, on October 8, when the system called a data port, the dynamic data display on the front-end page was accidentally "cleared".
In order to make the reservation data as real as possible, Tmall decided to "multiply" the number of new reservations from October 8th by three, so that the number of subsequent reservations can quickly approach the real data...
...
Pay attention to the text I marked in red. If Tmall’s response is consistent with the actual situation, then, in fact, this is a BUG!
Lao Luo is really not busy enough. Lao Luo officially responded on Weibo on October 19: The falsification of booking data has nothing to do with us. The only role we played in this matter was to lie in wait.
Is this going to be like Rashomon? Dear friends.
Regarding this matter, I can’t help but sigh: If you are not afraid of opponents who are like gods, you are afraid of teammates who are like pigs... If you are not afraid of teammates who are like pigs, you are afraid of netizens who are like gods. It is said that this fake BUG is caused by a certain tester Found out that the number of reservations is always a multiple of 3.
Apple iOS 8.0.1 update withdrawn
Apple, Apple on the altar, renowned for its ultimate user experience, has also been nailed to the pillar of shame because of BUG:
(2014) September News on the 25th: Apple released the iOS 8.0.1 update earlier today with the purpose of solving many bugs in the current version. However, unexpectedly, the update patch brought more bugs, and Apple eventually withdrew the update. upgrade.
It is understood that the two latest devices mainly affected this time are the iPhone 6 and iPhone 6 Plus. As a result, they can only accept no signal from the mobile network, and TouchID cannot be used. Therefore, it is recommended that users who have not upgraded yet should not upgrade, and users who have already suffered a tragedy can only wait for Apple to release a repair patch.
...
Some people say this is the sequelae of Steve Jobs's absence... I really don't know why these people always bring Jobs out to make trouble! In fact, this is a software BUG. From the perspective of a programmer, this is totally normal. Does it have anything to do with Steve Jobs?
Besides, this matter is not unique to Apple. Look at Microsoft, they don’t take it seriously at all. They issue patches one after another, plugging loopholes and fixing bugs. This It's all the fault of those programmers and has nothing to do with the moon in the sky.
Heartbleed vulnerability
On April 9, 2014, a major security vulnerability in Heartbleed (meaning "Heartbleed") was exposed. A security industry insider revealed on Zhihu that he used this vulnerability to try to read data on a well-known e-commerce website. , after reading it 200 times, he obtained more than 40 usernames and 7 passwords. Using these passwords, he successfully logged in to the website.
…
Heartbleed vulnerability, this critical flaw (CVE-2014-0160) occurs due to a failure to properly perform bounds checking before calling memcpy() with victim user input as the length parameter. An attacker could trace the 64KB cache allocated by OpenSSL, copy more bytes than necessary into the cache, and then return the cache contents, thus exfiltrating the victim's memory contents at a rate of 64KB at a time.
OpenSSL is famous, open source, and secure. The Internet sites it supports are like the stars in the sky, too numerous to count. Even such a well-known, open source, and powerful cryptographic library still has bugs.
BUGs are everywhere!
BUG The pursuit of programmers and the obsession with software are even more powerful than the current die-hard fans. It is like going to poverty and falling into hell. No matter where you are, whether in heaven or on earth, I will be with you and never leave you. , and never give up.
Live without bugs
Computer pioneer Maurice Wikes recalled how he was working in Cambridge, England in 1949. While dragging punched paper tape upstairs to load programs for the prototype computer EDASC, he saw his future:
I am strongly aware that the remaining good days of my life will be spent finding errors in my own programs.
Definition of Bug
The original English meaning of the word Bug is "bug" or "bug". But for programmers, bugs mean errors, defects, problems, loopholes, failure to implement requirements, failure to meet requirements expectations or extensions, etc... So, what exactly is a bug?
My wife is a tester. The most famous book on software testing is called "Software Testing". It describes BUG like this:
The software doesn't dosomething that the product specification says it should do.
The software does something that the product specification doesn't dosomething that the product specification doesn't say.
The software does something that the product specification doesn't mention. mention but should.
The software is difficult to understand, hard to use, slow, or in the software tester's eyes will be viewed by the end user as just plain not right.
As a developer, of course you must understand E-text ...
In fact, there is a cruder way of saying it: BUG is an error.
Where did the bug come from?
There is a saying in the Bible about "righteous people", and we have a saying that "no one is perfect, and no gold is pure"...
Man is born from his mother (created by Nuwa) (Except human time) - You see, I always add various explanations to plug loopholes. It is really tiring to write articles like this... This is really related to my development habits: I am always used to defensive programming and consider various things in advance. Errors, try to eliminate the conditions for their occurrence during coding...
We say that people are born from humans, demons are born from demons, and software is born from programmers.
When parents are preparing for pregnancy, many fathers will quit smoking, drinking and working overtime, which is called closing the mountains to cultivate forests. Mothers will take folic acid supplements, measure the ovulation period, and calculate the best time to conceive... In a word, it's eugenics and nurturing. However, children will still have problems after birth, and as the children grow up, various problems will appear. Some children have congenital defects, such as essential hypertension, congenital heart disease, harelips, dementia, mental retardation... Some children have long-term problems, such as myopia, strabismus, polio, lameness, autism... ...As parents, this is a fact that is difficult for us to accept, but we must face and accept it.
Software is the child of programmers. Before giving birth to it, have you ever closed the mountains to cultivate forests, and have you been familiar with your menstrual cycle? Wow hahahaha, this is too nonsense! Bao BuTong (one of the four great ministers of Murong Fu in "The Eight Parts of the Dragon", very interesting) shook his head and said, no, no. Of course! Developing software actually involves these processes, and more importantly, we must realize:
Programmers are producing software, and they are also producing BUGs!
No matter how good the programmer is, the software he writes will still have bugs. Bugs are software’s innate and inescapable good friends. From the very beginning of that easy-going trip, they became inseparable...
So, bugs are written by programmers Coming out...
Whether you want to admit it or not, the truth is so frustrating. Even Maurice Wikes admitted this, so please stop being stubborn, dear.
Receive LAMP Brothers’ original PHP video tutorial CD/"Essential PHP in Detail" for free. For details, please contact the official website customer service: http://www.lampbrother.net
http://yun.itxdl.cn/online /cto/index.php?u=5 This, is a great course http:// /yun.itxdl.cn/online/server/index.php?u=5 Mobile Internet Server Side Development Course
http://yun.itxdl.cn/online/weixin/index. php?u=5
WeChat Development Course
http://yun.itxdl.cn/online/yingxiao/index.php?u=5
Micro Marketing Course
http://yun.itxdl.cn/online/phpcms/index.php?u=5phpcms
Secondary Development Course
|