Researchers at MIT found that reading code doesn’t activate the same parts of the brain as language processing, despite the similarities that the two tasks share such as learning new symbols and terms. 

While it is more akin to the multiple demand network, which is often used for solving math problems or crossword puzzles, reading code tends to rely on a more general-purpose brain network. It doesn’t exactly replicate the cognitive demands of mathematics either, researchers explained. 

The finding goes against the hypothesis that math and coding rely on the same brain mechanisms and that the predominantly math and logic-focused left and the spatial navigation-oriented right hemispheres of the brain were activated. 

“Understanding computer code seems to be its own thing. It’s not the same as language, and it’s not the same as math and logic,” said Anna Ivanova, an MIT graduate student and the lead author of the study.

The research was done in partnership with researchers from MIT’s Computer Science and Artificial Intelligence Laboratory and Tufts University, and the paper appeared today in eLife. 

In the study, a group of young adults that were proficient in either Python or ScratchJr were shown snippets of code and asked what action the code would produce. The parts of the brain that were activated the most included the frontal and parietal lobes of the brain, which are used whenever many pieces of information are needed for storage at any given time. 

“It does pretty much anything that’s cognitively challenging, that makes you think hard,” Ivanova added. 

In addition, the research also found that there wasn’t any part of the brain that was found to be devoted exclusively to programming. However, this is not conclusive of professional programmers with many years of coding experience that may see some specialization in parts of the multiple demand system. 

“The findings suggest there isn’t a definitive answer to whether coding should be taught as a math-based skill or a language-based skill. In part, that’s because learning to program may draw on both language and multiple demand systems, even if — once learned — programming doesn’t rely on the language regions,” according to the researchers.