How did the ancestral code become a pile of shit?

One day, a few bugs interfered with the boss's money, and the boss hopes you can catch them.

With your youthful spirit, youthful vitality, and the art of programming you have accumulated over the years, you opened the company's code warehouse.

From a distance, it appears to be a working machine, with huge codes piled together to form a rough outline, creeping forward.

Looking closer, in the unclean frame, garbled sentences are spinning, spitting out like slugs with leprosy, thick water is flowing, and people wearing checkered shirts are surrounded by flame pillars. A semicircle, this is the ritual of the programmer. Surrounded by the indescribable plant, they kept reaching in and fiddle, and they kept taking out some things to fill in to make him pile up higher, in order to prevent him from reaching him, they took out the squishy paste, and tried to apply They stick together.

This is a Cthulhu suture monster piled up by the shit left by a predecessor. It looks shaky, with countless bugs crawling around. But he barely piled up a mountain-like figure, squirming to make money for the boss.

You are full of enthusiasm to clean up this mountain and make it a robust steel behemoth, which can be replaced with the latest parts at any time, galloping like flying, strong and unusual, and taking the brothers to the peak of life.

After careful analysis and following the traces of the bugs, you finally found the source of the problem. You found a bunch of old feces that a code farmer pulled many years ago because of the limitations of the times or the limited level. You think you just need to improve it. , Sorting out the structure, strengthening judgment and fault tolerance, it can be transformed into a steel part, making this monster one step closer to the behemoth.

You dug into the information, but found that things are not that simple. This tuft is actually not an isolated tuft, but integrated with the entire mountain. In other words, this mountain is actually a tuft of sticky and slippery Cthulhu, connected by countless tentacles and mucus. These Cthulhu stretch out countless tentacles and reach into unknown corners of the mountain. .

Some seem to have the same structure, but there are dozens or hundreds of repeated logic. There are countless branches of judgment that do not know where to reach. There are unexplainable mysterious numbers everywhere. There are mysterious calls that stretch directly from the surface to the bottom. There are also countless timers that cannot be guessed, cannot be understood, and cannot be predicted when it will be triggered and when it will erupt. There are also countless mysterious threads hanging there independently. It is impossible to guess when it will start suddenly, when it will hang suddenly, when it will suddenly grab resources from each other and deadlock, and which resources will be changed inexplicably. Mysterious link, mysterious task queue, mysterious pool, mysterious ring cache, mysterious stack.

They are coupled together, supporting each other, forming a larger Cthulhu shit, creeping slowly.

It is extremely difficult for you to clean up and modify a little bit of the content, so that the little bit of content is out of coupling and looks clearer. As a result, suddenly on the opposite side of Shishan Mountain, a feature that you never expected, suddenly hangs. A colleague who you have never contacted at work, through his investigation, found that he maintains a function/method, class, thread, memory block, pool, and your changed part is deeply coupled, your decoupling Caused incomprehensible mistakes and made mistakes in their parts. So you are scolded, you can only take a step back and make adjustments in a smaller range, but find that the bug is not only made up of this piece, so you follow the footprint of the bug and improve each module.

After going through rounds of criticisms and almost getting acquainted with the person in charge of all modules of the entire company, you finally caught a bug. But in this long process, you have long forgotten your original intention. In countless times of rushing to work overtime and staying up late, in the resentment after being scolded by colleagues and bosses, confession failure/arguing with girlfriend/found that my head is a little green in depression; countless times as temporary code written down, planned unit test completed In the process of rewriting but forgetting later, because of being lazy or unwilling to interrupt the train of thought, it was too lazy to pull out the wheel in the huge code block.

There are countless pieces of logic that seem to have the same structure, but appear dozens or hundreds of times. Countless branches of judgment that do not know where to reach. A large number of unexplainable mysterious numbers. A mysterious call that stretches directly from the surface to the bottom. Unable to guess, unintelligible, unpredictable when will be triggered, when will the countless timers erupt. There are countless mysterious threads that can't guess when it will start suddenly, when it will suddenly hang, when will suddenly grab resources from each other and deadlock, and change resources inexplicably. Mysterious link, mysterious task queue, mysterious pool, mysterious ring cache, mysterious stack.

Which bug you want to catch is indeed caught. However, where you haven't seen it, more new bugs are growing vigorously as it moves.

At this moment, you suddenly find that your feet can’t be pulled out. Several tentacles are climbing up your legs. Your hands are sucked into the mud-like shit mountain. You try your best to pull out your arms, but The more you struggle, the deeper you sink, as if there is an icy black hole in the center of the shit mountain, which is about to swallow all the close objects. Your essence is losing a little bit, a kind of extreme fatigue, but a feeling of relief surges up.

At this moment, you feel comfortable and satisfied, and gradually closed your eyes, you are willing to dedicate your hair and life, turn yourself into a patch, and maintain the lingering life of the system. It can't leave you anymore, you and your hair have become part of it.

I don't know how long it took. Finally, another bug was exposed during the operation and interfered with the boss's money.

The boss arranged for a young man to catch the bug.

This young man, with his youthful spirit, youthful vitality, and the art of programming accumulated over the years of studying the arts, opened the company's code warehouse...

At last

Provide free Java learning materials, learning technology content includes: Spring, Dubbo, MyBatis, RPC, source code analysis, high concurrency, high performance, distributed, performance optimization, microservice advanced architecture development, etc.

Friends in need can click: this! Click this , password: csdn.

There are also Java core knowledge points + a full set of architect learning materials and videos + first-line interview books + interview resume templates can be obtained + Ali Meituan Netease Tencent Xiaomi Iqiyi Kuaishou Bilibili interview questions + Spring source code collection + Java architecture Practical e-books.

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/HarderXin/article/details/109954716