How programming affects the brain and mindset



It is true that the thinking of programmers is different than other people. Not to say that they are necessarily smarter, more logical or more rational than others. However, not so long ago, scientists began to study the effect of programming on the brain, and came to interesting conclusions.

As art classes can change your thinking in different ways, so programming affects your way of thinking - perhaps not in the way you expected.

1. Programming affects your cognitive models.


Does it matter what programming language you started your career with in this profession? Yes!
Sounds dishonest, right? Anyway, most of us got acquainted with programming at school, and the first language was imposed on us. I started with the language of S. Those who are older than me started with FORTRAN, COBOL or BASIC. And those who are younger? You probably started with Java or Python.

Without a doubt, the structure of the programming language affects the way of thinking. Edsger Dijkstra, one of the most influential scientists in the field of computer science, knew this when he said :

The tools we use have a deep (and latent) influence on our thinking habits, and therefore on our thinking abilities.

Then he said:

COBOL disfigures the mind; his teaching should be considered a criminal offense.

And further:

It is almost impossible to teach students who have previously studied BASIC to program well: as potential programmers, they are mentally crippled, with no hope of recovery.

Oh.

In a sense, all programming languages ​​are equal because they are Turing-complete . On the other hand, mastering one language can lead to problems in another. Java and Python programmers are two different types of specialists who have completely different approaches to programming.

In other words, the paradigms and idioms of your first programming language affect, and even dictate, your mental approaches to data structures, algorithms, and so on.

Moreover, you can take the anonymized code and determine who wrote it, relying only on the chosen approach to solving the problem and the style of writing code. And the harder the task, the easier it is to "de-anonymize" the code.

Pay attention to this study of the style of the code and the decoding of the lecture devoted to the same subject :

Programmers can obfuscate variables or function names, but not the structures that they subconsciously prefer to use, or their favorite increment operators.

There is a proverb in English that summarizes the above in one clear phrase: “ When you have only a hammer, everything looks like a nail .” That is, having learned to program in a certain way, you will approach in a similar way to solving all problems.

So choose a programming language wisely!

2. Programming helps improve brain health.


The brain is often compared to a muscle that needs to be constantly trained in order to remain intelligent and clever. Is it so? And if so, can programming be considered a mental exercise sufficient to enhance brain health?

The authors of the 1991 meta-study wanted to find out “the effect of computer programming on cognitive results,” and found that students who had programming experience recruited 16 percentile points when testing cognitive abilities than students without programming experience.

In a larger 1999 study, it was confirmed that “intellectual activity impedes the decline in [cognitive] abilities.” But the authors also noted that, perhaps, a decrease in cognitive abilities may lead to a decrease in involvement in intellectual activity.

The authors of an even larger 2009 study came to the same conclusion, and suggested that "people involved in brain-stimulating activities may reduce the likelihood of [and even delay the onset] of Alzheimer's disease and other types of dementia in subsequent years." By the brain-stimulating activities attributed reading, writing, puzzles, board and card games, music performance.

Finally, a study published in 2013 said that only strictly certain types of mental activity actually improve our brain, namely, intensive cognitive activity, intellectually difficult and implying the study of something.



Of course, this topic requires more research, but it is still difficult to imagine such mental activity that requires more strength and is more focused on learning than programming.

Although all the mentioned studies do not prove that intellectual activity makes us smarter or more capable, however, the results suggest that difficult cognitive tasks at least improve the current state of the brain and significantly reduce the likelihood of degradation.
There is a point of view that it is never too late to learn programming, and the research described only confirms this view. Programming is good!

3. Programming is not only mathematics with logic.


In a 2014 study, functional brain scans were used to study brain activity of programmers who tried to understand and work out code fragments. It turned out that the study of the source code involved five areas of the brain:

That is, when working with source code, those parts of the brain that are usually associated with language processing, memory and attention are mainly involved.



Please note that there are almost no brain sections associated with mathematics and computations - even when analyzing fragments with cycles, conditional and arithmetic computations, and other algorithmic operations.

Of course, the study was not comprehensive, and its authors point out :


But what should be noted. We know that programmers regularly analyze source code written by themselves or by someone else. We also know that programmers often spend more time correcting and refactoring existing code than writing a new one from scratch.

So this study is not at all pointless. Programming is not just “the activity of the left brain hemisphere,” and it can even be assumed that the “right-brain” programmers have a certain advantage.

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


All Articles