Content area
Programming is a cornerstone of modern society, yet its cognitive and neural basis remains poorly understood. In this study, we test the hypothesis that programming "recycles" pre-existing neural mechanisms and representations in fronto-parietal reasoning networks. Using fMRI, we scanned programming-naive undergraduates (n=22) before (PRE) and after (POST) an introductory Python course. During the PRE scan, participants viewed pseudocode (plain English descriptions of algorithms), and during the POST scan, they read Python code. We found that a left-lateralized fronto-parietal network, previously implicated in programming experts, distinguished between "for" loops and "if" conditionals across both pseudocode and Python code. Representational similarity analysis revealed consistent representations of algorithms across formats (code/pseudocode) and learning stages. Furthermore, such representations encode abstract meanings rather than superficial features. Our findings demonstrate that programming not only recycles pre-existing neural resources evolved for logical reasoning, but the recycling takes place rapidly with only a single semester of training.
Competing Interest Statement
The authors have declared no competing interest.
Footnotes
* https://osf.io/2ncfm/