Computer code comprehension shares neural resources with formal logical inference in the fronto-parietal network

Yun-Fei Liu, Judy Kim, Colin Wilson, Marina Bedny
2020 eLife  
Despite the importance of programming to modern society, the cognitive and neural bases of code comprehension are largely unknown. Programming languages might 'recycle' neurocognitive mechanisms originally developed for natural languages. Alternatively, comprehension of code could depend on fronto-parietal networks shared with other culturally-invented symbol systems, such as formal logic and symbolic math such as algebra. Expert programmers (average 11 years of programming experience)
more » ... code comprehension and memory control tasks while undergoing fMRI. The same participants also performed formal logic, symbolic math, executive control, and language localizer tasks. A left-lateralized fronto-parietal network was recruited for code comprehension. Patterns of activity within this network distinguish between 'for' loops and 'if' conditional code functions. In terms of the underlying neural basis, code comprehension overlapped extensively with formal logic and to a lesser degree math. Overlap with executive processes and language was low, but laterality of language and code covaried across individuals. Cultural symbol systems, including code, depend on a distinctive fronto-parietal cortical network.
doi:10.7554/elife.59340 pmid:33319745 pmcid:PMC7738180 fatcat:d6luatls2rhmvait4w5ngpqv2i