Friday. Nonsense programmer 2.0

    Hi, Habr! Last Friday laid out his delusional thoughts. Thanks for the karma, the pros and most importantly for the caring comments. Today continued. Again, please do not judge too harshly. After all, this is just a fantasy.

    image


    Rust on the sword


    Friday after work. I leave the office and think how to spend the evening. I can not forget about the last trip to a nightclub. There was something strange about how Alla left. And further. When we danced with her, our bodies somehow successfully approached each other. Very often, you have to make an effort and, overcoming the awkwardness, try not to step on your legs. Here, the hands themselves went where they needed to and the bodies touched where necessary. We must try to find it.

    And you need to look where you lost. Probably today again a nightclub. I go to the store to buy dinner. A bottle of wine and a bottle of water, bread, something like pate, apples. The cashier punches the purchase.

    - Is there a discount card?


    I react strangely, even to myself ...

    - Is there a discount card?

    My face must be distorted by a terrible grimace, because the cashier stops communicating and quickly punches a check. I step aside.

    I do not like discount cards. Buyers wallets are now huge. They are just bursting with content. But they do not contain money, as it may seem at first, and why the wallet in general was conceived. And they contain an incredible amount of plastic promises.

    I also don’t like gas station cards, all sorts of airplane miles, cashbacks, blunt stocks 2 = 1, 3 = 2, 4 = 3, clever actions like pay in August and get in December. Cause hate accumulative accounts of sham wrappers. Gold, silver, bronze, platinum collars and muzzles. And the tariffs of cellular operators, which they invent with particularly sophisticated sadism, are particularly disgusting.

    Of course they will tell me - why have you lost your mind? People care about you. Take it cheap for now and leave soon, while we're all so kind here. But friends, let's not be so naive simpletons. After all, the question is not why we are sold at a discount cheaper, but why in all other cases we are sold more expensive. And I would rather call this so-called loyalty discount a premium for the right to choose.

    From my point of view, this is all discrimination and restriction of freedom. I think sooner or later all this will be banned at the legislative level, as barter or the sale of alcohol to children was banned at one time. After the law is passed, such scenes appear to me.

    For example. A police officer dressed as a teenager in a baseball cap and with a skate under his arm buys a microwave in the hardware store. He looks at the seller with pleading eyes and barely audibly says:
    - Maybe there is a discount card, eh?
    - What are you, boy, it's forbidden.
    - Well, at least one and a half percent. I will not tell anyone.
    The seller, looking around from under the counter, gets an old, yellowed piece of plastic. At the moment when the plastic has already touched the teenager’s hand, but has not yet left the seller’s hand, the handcuffs snap into place on the seller. People in black take him through the back door and take him away in a black car in an unknown direction.

    Or for example there is a RAM in a large sales company. The CEO says:
    “Something is not very good in this quarter.” Maybe there are ideas how to increase sales?
    All ponder options. Here a young but promising manager gets up and says timidly.
    - Maybe that ... That ... We will issue a discount card ...
    The deathly silence hangs in the office. They all stared at the table. You can hear the last-year-old fly in the window. General pales and takes a hard look at the head of security. He averts his eyes. After the RAM, no one ever sees the promising manager again, at least within the Pale of Settlement.

    In addition to the wild inconvenience for wallets and for the brains of buyers, all the discount cards have another bad property. You just have to think about what is happening on the other side of the card reader. These are terrible server loads that calculate and store all this cumulative nonsense. And of course this is a terrible load on the brains of IT teams that support all this.

    Are you sure that all the incredible power of computers should be used to bring thrifty housewives into awe? Did our fathers and grandfathers create IT for this?

    Victory history


    When you read about the development of information technology, it generates the vitality and the perseverance with which digital technology cut its way into science, defense, industry.

    As soon as she got to her feet, in the form of bulky structures made of lamps and ferrites, she had already solved strategic tasks such as solving the enemy ciphers, creating an atomic bomb, or calculating ballistic trajectories. It is like a three-year-old child was wearing a helmet, given an automatic rifle in his hands and sent into battle.

    And digital technology has withstood.

    Although she had quite adult competitors. I'm talking about AVM - analog computing machines. For some time they were faster, more precisely, more economically than digital ones. The essence of AVM is that in order to obtain a solution we take a certain physical principle, whose behavior is similar (similarly) to what we need to model.

    The principles used are very different - mechanical, hydraulic, pneumatic, electrical. If you have never seen how Gaudi calculated his architectural forms with the help of ropes and sandbags, then be sure to take a look. Fascinating spectacle.

    To finally clarify the essence of the actions of the AVM, you can try to solve a simple task, since the popularizer of physics Perelman describes this in one of his books.

    Suppose you need to determine the optimal location of a rural school for three villages. The matter is complicated by the fact that in villages there are a different number of children, well, for example, 10, 20, 50. You put the map on the table and drill through the hole in the villages. And you pass through them three strings connected in a knot. Tie a weights to each string according to the number of children (10 grams, 20 grams, 50 grams). So what? Well, that's it. Weights will be balanced and the node will show the optimal location of the school. Fast, easy, elegant.

    And it is simply amazing how, compared to this, in clumsy digital machines they could see the potential that even the wildest fantasies have surpassed. But what happened happened, digital technology won. And here, I want to unexpectedly talk about more modern things.

    Quantum computing


    When the hype around quantum computing subsides and the wave fog of uncertainty dissipates, it will become clear that quantum computers are the same analog computing devices. They work as a device with weights, only instead of weights - quantum particles, and instead of strings - entanglement. And they have all the flaws that eventually led to the almost complete disappearance of the AVM. These disadvantages are narrow specialization, loss of accuracy, lack of determinism.

    Interestingly, compared to the history of classical calculations, quantum calculations are developing in greenhouse conditions. No one sets specific tasks and deadlines for them. On the contrary, everyone is trying to THINK any real problem on which quantum supremacy would be obvious. While this is not very successful. Decomposition of numbers into factors that someone has multiplied with bad goals, I can’t refer to such problems. Moreover, post-quantum cryptography is developing faster than quantum cryptography.

    Therefore, if someone was interested in my opinion (which is certainly ridiculous) where to invest a couple of trillion dollars, I would rather send them to create some kind of super-nano-optical transistor that would increase the performance of ordinary von Neumann calculations for a couple more -troyku orders. This horse has never failed.

    But there is something special in quantum computing that is not similar to the previously known one. This idea constantly eludes me, but you can try to clarify it somehow. I think that the matter is in the working body of this analog computer. These weights are perfect. They have perfectly accurate characteristics and are absolutely similar to each other. Although this is a kind of stupid question, but still I want to ask: why?

    Why are two electrons similar to each other like ... I wanted to say two drops of water. But the fact of the matter is that water droplets are different and in general everything in nature is different. Everything except elementary particles. But all the same applies more to the field of information than to physics.

    Bits ... qubits ... All very suspicious.

    In general, as DiCaprio said. We need to go deeper.

    Cybernetics


    Today we are all pretty easy to reason, and in general about virtual worlds, and that our world is probably virtual. And all this is in the Matrix, the Thirteenth floor, the Beginning. This is part of the mass consciousness. Prior to this, the question was in general almost completely investigated by Lem. And probably someone else. But I was always interested in the question of who was the first to commit this mental thought and allowed him to interpret the surrounding reality so widely.

    And all threads, at least me, lead to Norbert Wiener and to his Cybernetics.

    Now every year creates a lot of science and science. But their subject, as a rule, is narrow and the goals are utilitarian. I think cybernetics is the last fundamental science. Many people believe that cybernetics is simply a theory of information processing, which opened the way to the era of digital computing devices. This is true, but it is only the tip of the iceberg.

    Cybernetics has done what no science has yet succeeded. She specified such an elusive concept as information, and expressed it through a strict physical quantity - entropy. By this she formed a scientific basis for studying information processes, mental activity and, ultimately, the human mind.

    Before cybernetics, physics, biology and psychology existed independently, and all attempts to combine living and inanimate nature were naive at best. Cybernetics has closed the last link in the chain of knowledge of the universe. She built a bridge between being and consciousness, between soul and body, between life and death. And, having risen on this bridge, we can already discern, if not the Creator himself, then at least his plan.

    Here is what Norbert Wiener himself says:

    At least one thing is absolutely clear; the physical individuality of the individual is not connected with the material carrier. Individuality is a flame, not a stone, a form, not a material filling. This form can be transmitted over communication channels, modified or copied. The fact that we cannot yet telegraph a person’s scheme from one place to another is mainly due to technical difficulties.

    We are floating upstream, fighting a huge stream of disorganization, which, in accordance with the second law of thermodynamics, seeks to reduce everything to thermal death, universal balance and sameness. We are not at all fighting for some definite victory in an uncertain future. The greatest of all victories is the ability to continue to exist, to know that you existed. No defeat can deprive us of the success that lies in the fact that for a certain time we have been in this world, which seems to have nothing to do with us. The demands of our own nature, an attempt to build an island of organization in the face of the prevailing nature's tendency toward disorder is a challenge to the gods and at the same time they themselves create an iron necessity.

    Well, what are we doing here?


    Norbert Wiener was a very scattered man. You can read a lot of stories and anecdotes on the net. I will not repeat them. But it seems to me that he was not absent-minded, but, on the contrary, more concentrated than those around him. This is confirmed by the result of his life.

    I do not dare to compare myself with great geniuses, but I have enough absent-mindedness too.

    For example, yesterday, I was thinking about how to push the confirmation code through three systems that need it, and do not crush four more systems that don't need it. This confirmation code arose simply because the two departments could not agree on a trivial matter.

    And in my head a cumbersome picture of business abstractions that explains how our company ultimately earns money is balancing on the verge of understanding. Naturally at this moment I am a bit disconnected from reality. Unnoticed from behind, an employee approaches.

    - Mikhail ... Mikhail ... Sorry, yesterday I applied to you for a report for the personnel department.

    A weighty thought graph flies in all directions. Shards of thought, like needles digging into the skull from the inside. I stupidly look into space, trying to recover. The girl saw it comes to mind.

    - Oh, I see you are an introvert ... Well, okay, I'll come back tomorrow sometime ...

    Hell!!! I am not an introvert !!! I'm just trying to think. If any corporate God would save programmers from this duty, then everyone would see that they are quite sociable people. And that they can take an active part in all the joys and sorrows of office life.

    The fact is that after all these sacred dances around missions and goals, after seance sessions in meeting rooms, after stroking corporate elephants on rough trunks, blowing out candles on business cakes and other collaborations, sooner or later the programmer remains at his workplace alone at one with the computer and starts looking directly at the monitor. And quite clearly understands the following.

    First, he cannot delegate anything to anyone. Because everyone delegated everything to each other. And ultimately delegated to the programmer.

    Secondly, he cannot bribe a computer. He cannot threaten him with a European court of human rights. He cannot drink with him for the purpose of gaining confidence. He cannot seduce him and ask him to do all the work himself.

    The only way is to pour yourself a cup of spooky-tasting coffee. To penetrate into this whole mess created by so-called extroverts. Collect the remnants of common sense into a fist and write code that will make this mess more or less manageable.

    Where is the truth?


    Naturally, the programmer stops looking for various social structures in search of truth and more and more plunges into the world of program code. The code is probably the only thing that never deceives him.

    Once upon a time, Orakl was a normal company and tried with all its might to improve what it was founded for. And there was such a cool expert on Oraklu Tom Kite. And he had a website Ask Tom. On this site, people asked him questions, and he answered them. The site was a resounding success. And the reason was simple.

    When Tom answered the question, he, as a rule, did not refer to the documentation and did not enter into discussions. He simply wrote to the command console, received the output, and in response to the question published these dumps.

    So Tom was never wrong.

    So we all have to act and trust only the code. Even comments in the text of the program should be wary. And the more comments, the more suspicion should be. By the way, what kind of fashion is this - to transfer program logic to annotations. This is horror. You can still be reconciled when annotations are used for documentation. But when they now determine the behavior of the program through different CI-containers and ORM-mappers ... How is that, guys? After all, the code is the only truth that remains with us.

    The programmer with bated breath looks at the screen. On the screen, the usual editor. In the editor - the code. Only perfect, clean code. And he feels: TRUTH is somewhere nearby.

    Another evening without Alla


    Again, behind reflections, I unwittingly found myself at home. Need a little rest. And, probably, in a nightclub.

    I check mail.

    From: PhD Hose <shlang31415@yandex.ru>

    “Hi, bratelo! Our professor is completely outraged, wants to apply for a grant, but there are no calculations. In general, you need to count on a huge graph, either in depth or in width - it is not yet clear. I know you like these troubles. The deadline is tomorrow at 10:00. See Attachment. They won't rust after me. ”


    My heart beat faster . Such tasks do not always come across. Of course, you can invent them yourself, but this is not interesting. Anyway, that kissing a fictional girl. And here everything is real ... The nightclub seems to wait.

    I look at the clock - there is not much time left before the deadline. And it is not clear how long the decision will take. You can not waste time. On automatism, the hands themselves open the programming environment, the file with the TK, the link starts downloading data ...

    ... Whoever has solved computer problems for a while understands the main meaning. The longer a person thinks, the less time is left for the computer to work, and vice versa. You can quickly create a simple program that solves the problem in the forehead, but then the computer does not have time to calculate all the options. The reverse situation can happen when a person, trying to make a high-speed algorithm, chooses the entire time limit. The optimal solution lies, as always, in the middle.
    “Buddy, I will not have time to calculate this, this is too much,” says the computer. “Do not worry,” says the man, “Now I will add a dozen lines, and the number of options will decrease by an order of magnitude.” Or a person may say, "Listen, buddy, I know that this can be done better, but it will take me too long to create the program and debug it." “Nothing,” the computer responds, “Come on what is. I am iron, I will not get tired and not sweat, I will sort out all the options and give you the right answer. In the meantime, think about something more important. ” In the process of solving the programmer and the computer are at the same time. They have a common goal and one for two time. And when the task is solved in time, it's great, because everyone did his job and did it well ...

    (to be continued)

    Also popular now: