Every Friday I’m at ... Ballmer Peak - is there any truth behind him?

    Many people know the comic relationship between the ability to program and the amount of alcohol consumed. According to the theory, there is a certain dose that reveals superhuman abilities for coding (according to empirical data - about 2 bottles of beer). However, have you ever wondered what proportion of jokes are in this joke? A bit of alcohol therapy and alcohol practice with blackjack and ... numbers and graphs at the bottom of the glass under the cut.



    I noticed that alcohol suppresses that quiet voice in my head, whispering something like “are you sure this will work?” And “maybe it would be worth checking it?” It suppresses so much that it seems like the code is pouring out of me like in a cornucopia .

    The problem is that the next day you understand that you should listen to this voice. You weren’t sure it would work, and it was worth checking.

    From the Alcohol Programming thread on Reddit

    In my short article, I will not talk about the fact that alcohol is salvation, or that it is universal evil. A lot has been written about the positive or negative effects of ethanol on the body. Including there are certain studies showing that it can have a positive effect on mental abilities, if you know the measure.

    Far from programming, low / moderate alcohol consumption slows down cognitive decline and reduces exposure to Alzheimer's.

    Come closer. The general effect of alcohol on cognitive functions can be divided into two groups - long-term (general effect depending on regular consumption) and short-term (during use and with an increase in blood alcohol concentration).

    Long term exposure


    When it comes to long-term effects, there are three groups of "consumers" - teetotalers, low-moderate and high consumption. Each measure has its own, and you need to know it so as not to drink less, but in this context, small means 1 or less glasses / glasses per week, and moderate means up to 2 glasses / glasses per day.

    Immediately a reservation that high consumption, both regular and episodic, leads to brain damage. This effect is cumulative throughout life, but you can “plant” the brain at a young age. Some cognitive functions are able to be restored to the "eyeballs", but not all and not completely.

    As for small and moderate consumption, everything is more interesting.

    1. Studies show that moderate alcohol consumption can slow the decline in mental abilities with age. However, most of us do not care much about this effect, because concerns mainly the elderly. And, as already mentioned, moderate consumption slows down the development of Alzheimer's disease.
    2. Some studies show not only a positive effect on cognitive function, but also on the subjective feeling of well-being, as well as fewer symptoms of depression in low and moderate consuming compared to teetotalers. And this is already more interesting to us, because programmers are one of the risk groups for developing depression. I will write about our professional risks and diseases later. Subscribe to the blog, so as not to miss. This effect is observed not only in old age, but also among young people. Interestingly, in old age this effect is observed more clearly in women than in men.
    3. A positive effect on mental abilities is better manifested in current "consumers" in comparison with teetotalers and those who are stuck. Studies have shown this effect for both regular consumption and episodic, but, unfortunately, did not determine the measure.

    Naturally, not with a single alcohol, and all these effects can be affected by other factors and the nuances of your lifestyle. However, the phenomena mentioned above can be considered statistically significant.

    Short-term exposure


    And here we come to the most interesting - exactly the impact that is described on xkcd . Alcohol excites the minds of scientists around the world, both figuratively and literally. There are many different studies that examine the issue from different perspectives.

    For example, a group of scientists at the Department of Psychology at the University of Illinois in their work Uncorking the muse) showed that a certain concentration of alcohol in the blood (of the order of 0.75 для, which is 3 bottles of light beer or 3 glasses of non-fortified wine for a full stomach for the average fatness of the programmer) increases the effectiveness of the creativity test in comparison with a sober state. For the study, the Remote Associates Test system was used. In short, the subject is given a set of cards with three seemingly unrelated words, his task is to pick up the fourth, which in a certain way connects the given ones. More can be read on the great and all-knowing .

    However, such a study is very limited and one-sided. The creative process of programming is the complex interweaving of various cognitive functions. Fortunately, there are more in-depth studies analyzing the effect of alcohol on the individual components of the creative process.

    Back in 1926, the British social psychologist Graham Wallas published a theory that describes 4 stages of the creative process:

    1. Training. At this stage, a comprehensive analysis of the problem, the collection of materials, i.e. a kind of preparation of the foundation and the bricks that will be needed in the further creative process (in our case, this can be a search for available libraries, exploring the capabilities of the API, etc.).
    2. Gestation. No direct work with “hands” is performed at this stage, but the brain combines the bricks from the first phase and looks at what interesting things can be made of them. In the case of programming, somewhere around here the general architecture of solving the problem is ripening. However, it will finally mature in the next phase.
    3. Inspiration. It is at this phase, from somewhere from the depths of the subconscious, the familiar “yes it is!” Emerges - a somewhat clear structure, creative concept, action plan, architecture emerges. As in the case with the previous stage, we cannot directly influence when the very aha moment arrives.
    4. Verification Stage of direct implementation. Unlike stages 2 and 3 uncontrolled at a conscious level, at this stage it is time to take the instrument in hand and embody the formed idea on paper in code. And, of course, check the viability of our decision.

    Later, another researcher added another phase. They called it very pseudoscientific - restitution. But in essence - this is a restoration of strength, a respite, relaxation of rolls - as you like best. By the way, this phase is very necessary, and if you ignore it, you can easily earn burnout. This is especially true for startup employees.

    Swedish researcher Torsten Norlander has analyzed dozens of different studies on the topic, resulting in a 20-page article . The main research concerned writers, composers, etc. Nolander came to the following conclusion:

    • moderate alcohol consumption complicates the preparation phase;
    • there is a beneficial effect on the stage of gestation in the form of more and more original ideas;
    • flexibility decreases, but originality at the stage of inspiration increases;
    • the verification stage becomes more complicated (remember the quote at the beginning of the post);
    • the restitution phase is facilitated.

    What does this mean for us? Obviously, you should not use it while reading manuals and directly in the coding process. However, if creative stagnation happened - a bottle of beer or a glass of wine could well get things off the ground. They can help to relax a bit after intense coding (remember the rate of moderate consumption).

    Another group went beyond the literary review. They conducted their own research, but were not limited to just one test. They carried out measurements on six different tests, testing various cognitive functions, one way or another involved in the creative process. The studies were carried out at four different blood alcohol concentrations: 0.0, 0.48, 0.82 and 1.0 ‰ at time 0, +60 min, +120 min and +180 min, respectively. The results are presented in the article “ Dose-Related Effects of Alcohol on Cognitive Functioning” . Short description of the tests:

    • Inspection time (Inspection Time, hereinafter IT ) - measure of incoming information processing speed without binding to motility (the latter are known to be reduced in any case);
    • the problem of the traveling merchant (The Traveling Salesperson Problem, etc. of TSP ) - a measure of strategic thinking; continuous monitoring of performance in a situation where it is necessary to make consistent decisions depending on many interrelated conditions;
    • useful field of view (The Useful Field of View test, hereinafter UFOV ) - a measure of processing speed and distributed visual attention;
    • self-ordering specified task (The Self-Ordered Pointing Task, further SOPT ) - metric evaluation Working (short-term) memory; requires the test subject to keep visual images in short-term memory and use them when thinking over the response strategy;
    • the task of continued attention to answers (The Sustained Attention to Response task, hereinafter referred to as SART ) is a measure of suppressing responses and cognitive flexibility; subjects should respond quickly to a frequently repeated set of stimuli, but refrain from responding to targeted rare stimuli;
    • test with paving the way (The Trail-Making Test, below the TMT ) - measures the cognitive flexibility and psychomotor functions.


    Which of these is important in programming? In my opinion, the TSP and SOPT tests are closest to the “mental” component of programming (building in the head and implementing the solution), IT, UFOV and TMT to the mechanical (visual orientation in the code), SART is irrelevant. I am pleased to read your opinions on this in the comments.

    What happened? Below is a graph of the results of eight variations of the basic six tests reduced to the baseline. A higher z-score corresponds to more time spent on the task (i.e. worsening the test result). White triangles are a sober immaculate group, black ones are tipsy. Asterisks indicate points with a statistically significant difference.



    So, we can see that, surprisingly, multivariate strategic thinking (TSP test) is almost not affected by alcohol at concentrations up to 1.0 ‰, but there is a noticeable deterioration in short-term memory (SOPT test). Those. we can still solve the problem, but keeping in mind a difficult decision will be more difficult for us.

    Adds fuel to the fire; the deterioration of all three tests for visual orientation ability. As a general result, while maintaining the ability to solve a problem, it will be more difficult to implement it in code.

    From personal experience of coding with the activity tracker turned on, I can say that although after a beer or two it may seem that you work no worse, it just seems. But you understand this only the next day, when you look at your sober head yesterday's schedule of keyboard activity.

    conclusions


    And draw your own conclusions. Science says that a little alcohol helps to get out of creative stagnation, but it makes it difficult to concentrate on the work process. And a lot of things help the soul to leave the mortal body in many ways. And Zhvanetsky generally says that alcohol in small doses is harmless in any quantity.

    Good Friday to everyone .

    PS According to Evan Sultanik, in fact, the graph on the XKCD is only a two-dimensional section of a three-dimensional graph. The third axis is the resistance of the programming language to the human factor.



    PPS Thank you for staying with us. Do you like our articles? Want to see more interesting materials? Support us by placing an order or recommending to your friends,30% discount for Habr users on a unique analogue of entry-level servers that was invented by us for you: The whole truth about VPS (KVM) E5-2650 v4 (6 Cores) 10GB DDR4 240GB SSD 1Gbps from $ 20 or how to divide the server correctly? (options are available with RAID1 and RAID10, up to 24 cores and up to 40GB DDR4).

    Dell R730xd 2 times cheaper? Only we have 2 x Intel Dodeca-Core Xeon E5-2650v4 128GB DDR4 6x480GB SSD 1Gbps 100 TV from $ 249 in the Netherlands and the USA! Read about How to Build Infrastructure Bldg. class using Dell R730xd E5-2650 v4 servers costing 9,000 euros for a penny?

    Also popular now: