📜 ⬆️ ⬇️

Russian programmers in Canada

Any Russian programmer, after a couple of minutes of reading the code, will definitely jump in and speak to himself: rewrite it all nafig. Then he wonders how long it will take, and the Russian programmer will spend the rest of the day on what he will prove to himself, that it only seems to rewrite this much work. And if you take and sit for a while, then everything will work out. But the code will be beautiful and correct.

The next morning, the Russian programmer is fresh, pleased with himself and without a faint hesitation tells the authorities that it will take one day to rewrite this piece, not more. Yes, no more. Well, in a pinch, two, considering all the risks. As a result, the authorities will give him a week and in six months the process will be successfully completed. Until such time as this code is seen by another Russian programmer.

And at this time, in the neighboring four dice, the work of Chinese programmers, who inexplicably manage to come before the Russian programmer, leave later, and at the same time do about three times less, will not diminish for a second. This four has not written any code for a long time, but only supports the code written, at one time, by a Hindu and rewritten twice by two different Russians. This code is not just live bugs. Here is their nest. This nest constantly reproduces itself with the help of the favorite Chinese technology of code reuse - copy / paste. From here, bugs crawl apart in different directions by means of static variables and variables passed by reference (since the Chinese programmer cannot accept the inconvenience caused by the fact that he cannot change the value of the external variable transferred to his function by the modules that the Russian programmer rewrites).

Recalling this function, a Russian programmer, as a rule, temporarily loses the gift of English speech and moves on to some kind of cross between Russian and Chinese. He has long dreamed of rewriting the entire piece that the Chinese are working on, but he has no time. On the Chinese hang serious bugs, which the authorities know and constantly rush them. The Chinese hastily outweigh the bugs of each other, because they know that trying to fix them will lead to the emergence of new, even worse. And in this they are right. To understand the order in which the static variables change and how they acquire their values, only one person in the company is capable of being a Hindu. But he is in meditation.
Therefore, when all four are fired during the cuts ... And who else should be fired? Russian - has not yet rewritten his piece, and the Hindu - the main value of the company. He rarely pays attention to the project, but when he does, everyone understands that, like him, nobody knows the architecture. So, when the Chinese are laid off, their code has two main fates. The first is that he will get to the Russians and will be rewritten. The second is that he will go to a local, Canadian programmer.

Oh, the Canadian programmer is a special type! Without a second thought, he, like a knight without fear and without reproach, rushes to fix the most ferocious bug of the Chinese code. This Bug has been living there for three years already and the Chinese have already (four times) informed the authorities that it has been fixed. But Bug returned each time, like Batman to his Gotham. So, a Canadian programmer will do what the Chinese have not risked doing for three long years. With the help of a debugger, it will track the place where the static variable took the value -1 instead of the correct 0, and with a decisive movement will lead the second variable next to it with the correct value. The bug will die in an unequal fight with a Canadian programmer.

But the victory will be achieved by a high price. Everything will stop working, including the code just rewritten by a Russian programmer. This will plunge the Russian programmer into thoughtfulness for two whole days, after which he will make, in general, a predictable conclusion that the design was wrong from the very beginning and everything should be rewritten. We need a week for this. Yes, a week, not more.

The Canadian programmer will boldly rush to fix everything, and it will become even worse, although it would seem ... This bustle will bring a Hindu out of meditation, who will come up with an ingenious solution at all - select the code. According to his plan, we will now support two versions of the same code - one working but with a Bug, the other without a Bug, but not working. Having heard about this plan, the Russian programmer will break the line on the table and call his wife a fool at home, but he will not dare to protest at the rally.

Fortunately, all this does not greatly affect the affairs of the company, since the product is sold and so. Therefore, the management is generally satisfied and does not get tired of reminding everyone that they are selected as the best among the best. And that we have long proved our ability to produce a product by releasing it sometimes.

This is a rather old text that came to my eyes for a very long time and was stored in the depths of the personal archive of high-quality humor. The author, unfortunately, is not known to me. Thanks adontz , there was a link to the original text , dated as much as 2002. Although it seems to me, it will not lose its relevance for a long time. =)
All with Friday and less bugs to you in your programs!

Source: https://habr.com/ru/post/104321/

All Articles