Reveals language comprehension facilitates early coding skills in novices, suggesting cognitive scaffold effects.
To resolve the contested cognitive foundations of programming, we used functional near-infrared spectroscopy (fNIRS) to compare brain activity in 29 coding-naïve adults while they performed three carefully contrasted tasks, each selected to probe a distinct cognitive function: graphical coding (ScratchJr) engaged linguistic parsing and logical-spatial operations; language comprehension targeted semantic and syntactic processing; and mathematical tasks (mental rotation and arithmetic) tapped visuospatial reasoning and numerical cognition. Univariate analyses revealed that coding robustly engaged core language regions, including Wernicke’s area and the angular gyrus, with activation patterns statistically indistinguishable from those during natural language comprehension. At the same time, coding also selectively recruited regions linked to mathematical cognition, including the right dorsolateral prefrontal cortex, parietal lobe, and sensorimotor areas. Critically, temporally resolved analyses revealed a dynamic sequential architecture: during the early phase, coding-activated networks overlapped with language comprehension, whereas the later phase was characterized by sustained and enhanced activation in the frontoparietal network associated with executive control and logical reasoning. These findings provide systematic evidence for a temporally dynamic neural foundation of coding: wherein the brain initially leverages language systems for comprehension before progressively engaging mathematical regions for logical reasoning.
No takes yet. Share an insight, caveat, or question.
Huang et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: