Brain Activity While Reading Code #
- Reading code doesn't activate language-processing regions of the brain. Instead, it activates a general-purpose network called the "multiple demand network," also used for tasks like math and logic.
- Coding utilizes different parts of the multiple demand network than math or logic problems. This suggests that coding involves unique cognitive skills.
- The study employed two highly readable programming languages: Python and ScratchJr (a visual language for children).
- The study used fMRI to observe brain activity while subjects read code snippets and predicted their function.
- The results showed minimal activity in the language regions of the brain.
The Multiple Demand Network #
- The multiple demand network is responsible for tasks that require holding multiple pieces of information in mind simultaneously.
- This network is spread throughout the frontal and parietal lobes of the brain.
- Previous research suggests different hemispheric dominance for math/logic (left) and spatial navigation (right).
- Coding appears to activate both left and right hemispheres of the multiple demand network. ScratchJr activated the right side slightly more than the left.
Implications for Teaching Coding #
- The findings suggest that learning to program may draw on both language and multiple demand systems.
- However, once learned, programming doesn't rely on the language regions.
"It looks like computer science educators will have to develop their own approaches for teaching code most effectively." – Anna Ivanova
Future Research #
- The study suggests that specialization in brain activity related to coding may develop with extensive programming experience.
- Future research could investigate the brains of professional programmers with years of experience.
- The study used relatively simple coding tasks and may not capture the complexity of real-world programming.
Top Quotes #
"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." – Anna Ivanova
"It’s possible that if you take people who are professional programmers, who have spent 30 or 40 years coding in a particular language, you may start seeing some specialization, or some crystallization of parts of the multiple demand system." – Evelina Fedorenko
"There have been claims from both camps — it has to be together with math, it has to be together with language. But it looks like computer science educators will have to develop their own approaches for teaching code most effectively." – Anna Ivanova