Learning computer programming is quite similar to learning a foreign language in that both require us to memorize brand new symbols and terms, master proper syntax, and the code must be clear enough so that other programmers can read and understand it.
Nevertheless, neuroscientists at MIT have found that the areas of the brain called upon to read computer code are not the same as those that process regular language. Instead, the code activates distributed neural networks called multi-demand networks – which are also used to solve complex cognitive tasks, such as solving math problems or crossword puzzles.
But the system resources of the multi-demand network used to read code are also significantly different from when thinking about math, suggesting that code is not a mathematical language either.
“Reading computer code appears to be an idiosyncratic ability. Programming languages are different from languages, and different from math and logic.” said the study’s lead author, Anna Ivanova, a graduate student at the Massachusetts Institute of Technology.
Her paper was published today in eLife. Researchers from MIT’s Computer Science and Artificial Intelligence Laboratory and Tufts University also participated.
Language and cognition
Previous studies have shown that music and math do not appear to activate the language processing system.
“Our interest is to explore the relationship between language and programming languages, partly because computers are something that came later and we know there can’t be any hard-wired mechanisms that make us good programmers.” Ivanova said.
Two schools of thought exist about how the brain learns to program, she said. Some believe that to be proficient in programming, one must be proficient in math. The other school argues that linguistic talent may be more important because of the similarities between coding and language (ehhh, I’m in that school). To put an end to this debate, the researchers looked directly at patterns of neural activity in the brain.
The main subjects examined in this study were Python, known for its readability, and ScratchJr, a visual programming language designed for children ages 5 and up.
The participants in the experiment were young people who were proficient in the tested languages. The programmers were asked to lie in a magnetic resonance imaging (fMRI) scanner, and the researchers showed them snippets with code statements written on them and asked them to say the results of their runs.
Few language areas of the brain were seen to respond to the code. Instead, they found that what was significantly activated was the so-called multidemand network. This network, whose activity is spread throughout the frontal and parietal lobes of the brain, is typically used to accomplish tasks that require large amounts of information.
“Multi-demand network for cognitively challenging tasks.”
Previous research has shown that math and logic problems appear to depend primarily on multiple demand areas in the left hemisphere, while tasks involving spatial navigation activate the right hemisphere more. The MIT team found that reading code appears to activate networks on both sides simultaneously, with ScratchJr activating the right side somewhat more than the left. This finding suggests that programming languages are inherently different from mathematics.
In other words, neither of the classic two schools of thought is correct. But that’s probably a good thing. Programming is a unique and relatively independent skill from language and math, and we can train specifically to reshape our brains.
In the future, it may be necessary to develop more targeted – rather than traditional mathematical or linguistic – education and training for programming skills, to produce high-level programmers more efficiently.
Recent Comments