Friday. Nonsense programmer

    Hi, Habr! Sometimes different thoughts start to wander in my head. Something recorded. It turned out something like a story. Do not judge strictly - after all, these are just fantasies.


    Strange dance

    Friday after work. I'm at a nightclub. He invited a girl with the pleasant name Alla, and we dance to a rather pleasant composition.

    - So who do you work, Michael?

    This question always arises in the course of communication, sometimes earlier, sometimes later. And I always doubt what to say. Because if I say that I am a programmer, the relationship will end quickly.

    And the point is not that girls treat programmers badly. Everything is just the opposite, especially recently. Financial nuts began to tighten and easy money gradually began to disappear from the economy. It became clear to the girls that in IT they are witty, reliable, not heavily constrained by material problems and therefore not greedy guys.

    It's not all about programmers, but specifically in me.

    This is how it happens.

    - I am a programmer.
    - Programmer ?! - Alla's eyes open wide. - Tell me, this is probably so interesting. I don't understand anything about computers.

    Old as the world was, about which Carnegie wrote, to sincerely become interested in and talk to the interlocutor. Girls like to use it. Of course, it works, and against my will I take another step towards a lonely evening.

    - How do you think, Alla, how many computers are working in this room now?

    Alla looks around, her eyes stop at the DJ's laptop.
    - Well, one at the DJ.
    - You have not considered something. Let's count. There are about a hundred people in this room right now. Everybody has a cell phone. In a modern phone, as a rule, there are 4-8 main cores, 2-3 auxiliary, another processor via Bluetooth and Wi-Fi, another processor serves a cellular communication module, two crypto processors in two SIM cards, most likely there is a coprocessor for music, well one or two for some unknown functions. Total - an average of about 15 processors for one phone. And a person still has several bank cards - for each is still a crypto processor, a fitness bracelet or a watch, and there are still a couple of cores, again the same bluetooth, wireless headphones ... Well, in general, 25 processors per person is quite an honest number. Total we receive 25 * 100 - 2500 processors.
    - Wow.

    Alla is intrigued. Here I would stop and transfer the conversation to another channel. But I already suffered.
    - But that is not all. All these colorful lights around are made lighting equipment. In every smart lighting fixture, at least on a processor plus two or three processors on the lighting console, another 20 processors are a plus. The sound also does not do without digital processing - equalizers, amplifiers are still plus 10. A pair of TVs hang on the wall - another ten cores. Well, do not forget about the fancy laptop DJ - I think plus 15 cores can still be added ...

    And then in the same spirit ... Acquaintance with Alla moves towards the inevitable final. As a rule, I still have time to say that the programs for these processors contain millions of lines of code. That each of these processors executes these programs at an average speed of an average of a million to a billion operations per second. That all processors are interconnected by high-speed channels and in an instant each exchange information with each one equal to a good library.

    Then I say that microprocessors are the only friends and helpers of man, with the possible exception of dogs and horses. Alla finally makes for herself the conclusion that I am crazy and disappear from my life under a specious pretext.

    I'm not crazy. I am a programmer who tries to be sincere.

    Why am I a programmer

    I liked it since childhood. And I did not even think that you could become someone else. There were no painful experiences about vocation, professional preferences, future career and possible earnings. It was as if I was gently picked up by an invisible stream and it was comfortable in it. This flow was so wide that the movement was almost not felt, although now it is clear that thanks to him I covered a huge academic distance that I cannot master by myself.

    Only now you begin to understand approximately the origin of this strange flow. Just at that time, civilization was making a Big Turn. Perhaps the most important in its history.

    More recently, mankind raved about space. My father became an aviation engineer. All eyes were fixed on the sky. All caught signals from satellites and astronauts smiles. Moon rovers, flights of probes to Venus and Mars. Nebula Andromeda Ephraim. Magellanic clouds Lem.

    And then suddenly something happened. The same Lem writes Kiberiadu. Everyone is talking about artificial intelligence, robots. The man suddenly stopped looking at the sky and began to connect with himself with gigabit channels. From nowhere a new inner space began to emerge, absorbing human resources, and most importantly, exciting minds and hearts. This cosmos was no less. And most importantly, it was much more accessible. It was a personal space for everyone.

    There is another reason. All adolescents instinctively drawn to the force. Everyone has their own understanding of power, so someone goes to the karate section, someone to the street gangs, someone buys a motorcycle.

    I felt that the real power is hidden in IT. That pressing the buttons in the correct order and thoughtfully looking at the spots on the monitor, you can change everything.

    About force

    I usually felt the power of IT unconsciously, but there was a moment when I felt it clearly, clearly and unequivocally. It happened when I purchased the first MP3 player.

    In our youth, we listened to Choi. We listened to him avidly, always and everywhere. For the most part these were tape recordings. Soviet tape recorders mercilessly chewed and washed the tape. We copied each other, from reels, from other tapes, from where we could. There was no other way. As you carefully do not save the tape, with each playback Tsoi's voice was getting worse and worse.

    And now, many years later, I downloaded the file to an MP3 player and Tsoi sounded in quality, which we could only dream of earlier. And most importantly - over time, this digital recording could NOT fundamentally be worse than EVER. This thought flashed through my head from the first chords I heard. Breath of something eternal.

    The ideas of digital immortality is not one day. And the problems facing science on this path are also completely marked. It is necessary to have a wild computing power even by today's standards. It is necessary to solve the problems of self-awareness, eros, motivation, free will. One should not stumble over the cloning paradoxes and the Chinese room. All this is incredibly difficult, almost impossible. But the stakes are insane, impossible high.

    While IT is still flirting with medicine and biology. There is a sham competition who will make a person’s life longer and happier. While leading the medicine. Implants, prostheses, stem cells, hormones, pharmacology. Billions are spent on all this. IT willingly lends a shoulder and serves. But after the successful digitization of the mind, all these ridiculous forests for the crystal lock of consciousness will disappear in an instant. Pharmacies, hospitals, motels and laboratories will disappear. Just as after the appearance of MP3 players, tape and vinyl disappeared in large quantities.

    And Choi will never die again.

    About the foundation

    IT has power, but IT itself does not hang in the air. IT relies on the foundation of science. I think the only people before whom programmers should kneel humbly are mathematicians and physicists. These are really real guys. They break into reality and fight for the secrets of nature not for life but for death.

    :) We, reliably protected from the dangers of this battle by the wall of our own tremendous ignorance, can only be guessed what is going on there. We guess from military installations like multikilometer circular tunnels and thousands of underground tanks. By strange bloodied formulas, sometimes flying out from behind a fence, and looking like ancient spells. And on popular science books, written explicitly high on a brief truce.

    So, in one of these books I read that it turns out that more and more physicists are moving away from the Copenhagen interpretation of quantum mechanics, which uses the concept of the collapse of the wave function. And accepts the so-called interpretation of Everett, implying the emergence of parallel universes. For an ordinary person, this means the following.

    For example, you like both Galya and Zina. And you are not able to make a choice with whom to live life. According to the latest physical trends you do not need to despair. But we must secretly sneak into the nearest laboratory and, in absolute secrecy, under the cover of night, do the classic experience of passing an electron through two slots there. At the same time, standing in front of Schrödinger's portrait, give yourself a terrible oath that if an electron passes through slot A, then you make an offer to Gale, and if through slot B, then Zina. According to the latest scientific assumptions, this is what will happen. At the time of the experiment, the Universe will be split in two, and in one of them you will register the passage of an electron through slot A, and accordingly live life with Galya. In another universe, you register the passage of an electron through slot B, and live life with Zina.

    And for polygamy you will not be imprisoned, since the police, the court and the prosecutor's office also split in two and will not notice anything.

    From all of this can go to the roof of anyone. But not the programmers. Because the programmer sees in this the principle of operation of the usual system function fork (), which is executed on his computer 10,000 times a day. Moreover, it has now become fashionable to fork anything from source codes to clusters. You do not like something. You said crax-pex-forc. And you already live in your own personal universe. And do whatever you want there.

    Dear mathematics and physics. Do not look down on us at all. Perhaps we are one of the few who truly can understand you. Let a little differently, but also deep. And with the same admiration for the great mystery.

    About understanding

    Programmers are generally intelligent people. And almost everyone can understand. Even the strangest things.

    The nature of people is incomprehensible. First, out of boredom, they invent non-existent things. Then with a gigantic, incredible effort of the mind, it forces itself to believe in the reality of these non-existent things. Then, showing the wonders of heroism live by the laws of these strange worlds.

    Almost always these hallucinations are collective. To support the illusion, people gather together for festivals, renovations, conferences, role-playing and other gatherings. Under these conditions, the mind finally gives up, accepts the rules of the game, and catches the buzz from new logical riddles and paradoxes.

    Programmers are generally the same people and therefore behave exactly the same, with one small exception. We do not need to make these titanic efforts for imagination, visualization and faith in what is happening. All the evil that can only appear in the imagination of people really exists in software systems. And not only exists, but also performs socially useful work. It’s hard to come up with any concept that programmers wouldn’t use as a metaphor for creating program code.

    Angels, demons, atoms, targets, masters, slaves, masters, wizards, queues, lists, fairies, writers, readers, semaphores, guardians, builders, destroyers, designers, destructors, factories, worlds, generators, iterators, arrays of structures, array structures, smart pointers, silly pointers, garbage collectors, workers of this garbage, ports, connection points, streams, threads, parents, children, events, subscribers to these events, catalogs, designers, controllers, models, parsers, forms, spiders, listeners, patterns, coders, decoders, encoders, decoders, locks, keys, open, closed, divided, signals, noises, stubs, snaps, substitutes, substitutes, ...

    This is called Object Oriented Programming.

    About good software

    Actually, I am an OOP fan. It so happened that when I started programming it was the most advanced approach. Now they are constantly assuring me that it is much better to dump the entire state of the program into one large, immutable corpse, and then to mock at it with the help of pure functions. Something prevents me from believing that this is the best approach. At least for fairly complex systems. Although maybe I'm just getting old, and these people are right. Because they make really beautiful things.

    When you talk about quality in IT, you come to the idea that it’s not about platforms, technologies and programming languages. It's about people. And the fact that all the great and beautiful things are done alone and in silence, and everything ugly and rotten is obtained as a result of voting and consensus.

    When I see a good and reliable product, then I always see the image of just one person, but who cares about the matter with all my heart. It can be a programmer, engineer, scientist, manager, or even a manager and owner of a firm. In the evening he cannot fall asleep in any way, thinking about the most effective and beautiful solution to the problem. Then, tired of thinking, he falls asleep anxiously, but after a while he jumps out of bed and writes something on a piece of paper. And so there is an idea that changes the world.

    This is how Pascal arose, when Wirth and his assistant wrote the Pascal compiler ON THE SAME PASCALE and MANUALLY applied the source code of the compiler to himself. This is truly a mystical story, like Munchausen, who pulled himself by the hair out of the swamp.

    Or the history of the Java language, which forever changed the programming landscape, then assumed the full horror of Enterprise development and still bears all this with honor. It began with the fact that several Sun engineers brought the handle to stupid technical and organizational solutions.

    Good examples can be found in the application software and gadgets that give you a sense of beauty and reliability. I had a Nokia-E51 for a while. I will not say anything more, who knows, he will understand. I take off my hat to those who did not sleep at night and did this good thing.

    About bad software

    When I see a bad, buggy and clumsy product, sometimes Junior seems to me, taking the first steps in real programming, and perhaps not imbued with the idea that everything needs to be tested. Sometimes - a novice product manager, who, due to lack of experience, has a first pancake. These are all normal situations. But more often, a completely different picture appears to the inner eye.

    It’s not yet an old, but tired of life financial figure who, for any debts, owned an IT firm. Things at this firm so-so, neither shaky nor shakily. And here he is sitting in an elite restaurant, picking a toothpick in implants and slowly thinking whether it is possible to squeeze a couple more hundred thousand dollars out of this lame filly or still exchange it for a share in the hypermarket chain. He decides to lose more and sends a letter from his smartphone, with an order to increase profits, reduce costs and all that.

    The managers of this company, heroically and at the same time prosaically dividing a tattered budget, are introduced along the way, pushing together already happened or just assumed responsibility.

    In general, they are good and talented engineers, but wildly tired of the useless deadlines and meaningless orders.

    There are so many of these people that they merge into a faceless gray mass rushing past with the speed of an airplane. But if you wish, I can stop this crazy movie on any frame, look into everyone’s eyes and ask ... I don’t know what to ask. And who am I to ask.

    After all, I'm one of them.

    Quit programming?

    But even sometimes being in very uncomfortable conditions, programmers do not give up programming. Therefore, in addition to corporate depresnyak there is some more. And this is something that they will not exchange for anything.

    My friends often offer to unwind in nature and invite to hunt or fishing. I can laugh as much as I can, but they continue to insist.

    - Come on, Michael, that's cool. After you catch the first few pikes, you will not be dragged away from the fishing pole. You just do not understand what hunting excitement!

    I just understand that. They DO NOT UNDERSTAND what happens almost every day on the screen of my computer.

    Search for errors in the program feels like a hunt for a beast. But only much more interesting. The difference is that the pursuit of an electronic beast goes in the state space, and it is much larger than a regular forest. Even one kilobyte of memory can generate more space than the number of atoms in the universe. A program can contain up to several million lines. Saves only the fact that the human brain has about the same state space. They agree in battle - the brain and the program code, and who will win - is never known.

    But the brain is not one - it has allies. The first ally is the tools. Programs that help to explore, debug and hack other programs. In the arsenal of an electronic hunter has it all. And traps where careless game can wander. And radars that comb the state space in search of prey. And a fine sieve through which you can sift every grain of sand in the electronic forest. And the stopwatch, which measures how much time and what the beast gets out of its power. And the tracker who sees even the weakest traces in the fields of electronic memory. And a pack of virtual greyhounds, driving a mistake into a corner.

    The second ally is the rules that all programmers are obliged to follow, even the most malicious hackers. You can create a mine that does not work according to the rules, which will mislead even the most experienced sapper, but then there is a high probability of exploding on it yourself. Everyone follows the rules and always - otherwise you will not survive in this complex world. This is ridiculous, but there are even rules for encrypting information, and not just rules, but standards — and everyone follows them!

    Needless to say that in the blood of a hunter there appears a sea of ​​adrenaline and not electronic, but the real one. You catch a mistake and drive it into a corner. Then you fix a couple of characters and the program works correctly. Malicious code destroyed. The error that has so long plagued people has been fixed. This is an incomparable feeling of victory ... This is real, pure, endless joy ...

    Evening without Alla

    Dreaming and smiling into the void, I stumble on the steps of the entrance. For delusional thoughts, the road from the nightclub seemed very short. At the entrance smells damp. I walk into the apartment and sit on the cabinet in the hallway. It is a pity that nothing happened to Alla. I liked her. But maybe we'll meet again.

    Why then suddenly it became sad. Insanity at work in its natural development took another height, the existence of which many did not even suspect. And with the money lately somehow not very. Can drop everything, start selling plastic windows and live without these worries?

    Glance falls on the computer, which is slightly visible through the doorway. He does not expect such a betrayal. Hell!!! As long as I have enough money for a piece of bread and a sip of wine, and my computer for electricity and upgrade, this magic will continue.

    I sit down in a chair and take a couple of sips from the bottle. I press the power button. Heat spreads through my veins and pulses through computer tires. Now we are with the computer - one. In slightly dilated pupils messages from the system loader are reflected. Go!!!

    And I fall into an infinite personal cosmos ...

    (to be continued)

    Also popular now: