Remember a painful online bug

Source: Internet
Author: User

To tell the background, when the new company just entered the 2 months, took over a red envelope system. The qualifications are still shallow, not very familiar with the business. Company to develop a new platform, the need to use red envelopes function to promote, in accordance with the needs of the product development ... However, the problem is here, the Red envelope interface is old, many code and have too much comment (even more comments incomplete, comment error), interface parameters are uneven, look very tired.

At first, all the calls to the red envelopes in the system were changed to call my red envelope system. And some end of the joint, there are various bugs, parameters no statute, the return parameters are not clear, (do not know what to return, no explicit requirements of the document), and finally a friend, the original SQL provided to me to solve the problem.

Then provide an interface for the end, internal docking, there are many new requirements, the old interface is not supported. A new interface was added, and the interface was provided by the code that was snapped out. First, the sub-terminal development of the slot code parameters when the size of small (tears, I can't because you one side to move the history code Ah, this interface we also do not know how many people in use, historical parameters problems please spit groove before the predecessor bar), and then the interface provided, about half a month later, began to tune, a few unknown bugs, After positioning, found that the code processing logic too much, a lot of things, so the end of another new interface method. Brush brushes, the test passed, no problem. Ready for the line, duang!!!. Focus on, the product when the demand for the first time users, the user is prompted to receive red envelopes, each device per user can only be picked once. The demand is very reasonable, I looked at the code, the original logic in the code to judge, inner ecstasy, directly to use, BOOM!!! BOOM!!! BOOM!!! The problem comes, the original code logic problem, there is a loophole, when the user used to play the red envelope, can be picked again. Oh, my God, I didn't notice the detail at the time. While testing to test, and did not consider this scenario, the results of the test passed, the program is no problem ~ ~ ~ Online ...

Smooth spent one weeks, and then exploded, more than 700 10 yuan red envelopes, by the same person brush away, fried, really fried, I was forced to the whole people, WTF!!!, quickly check the code, a check, this old logic inside the state leaked a kind, finished. Supposedly, there are various restrictions on the use of red envelopes, boy, this guy used our other platform, did not check the red envelopes bug, brushed a naked. My God, I want to cry without tears.

And then, through this thing, what I want to say is, to the old code, must look carefully!!! To look carefully!!! Look carefully!!! The project on money must be careful and earnest. Any code, no matter how long it has been online, no matter how stable, do not believe it, you must be well dug it, carefully look at every detail, think of every logic. It's not a problem, it's just not the time. In my case, this code was released in March 2015 to stabilize the operation for more than 1 years, then he still has a problem, and the price is more than 7,000 yuan loss, which is simply fatal.

Finally, I wish every programmer can handle the code, coordination of good work, we take more time to discuss the program, rather than let a person, two eyes touch blind, change a code, afraid of this affected, where affected, simply ~

Remember a painful online bug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.