Comprehension of computer code relies primarily on domain-general executive resources [article]

Anna A. Ivanova, Shashank Srikant, Yotaro Sueoka, Hope H. Kean, Riva Dhamala, Una-May O'Reilly, Marina U. Bers, Evelina Fedorenko
2020 bioRxiv   pre-print
Computer programming is a novel cognitive tool that has transformed modern society. An integral part of programming is code comprehension: the ability to process individual program tokens, combine them into statements, which, in turn, combine to form a program. What cognitive and neural mechanisms support this ability to process computer code? Here, we used fMRI to investigate the role of two candidate brain systems in code comprehension: the multiple demand (MD) system, typically recruited for
more » ... cally recruited for math, logic, problem solving, and executive function, and the language system, typically recruited for linguistic processing. Across two experiments, we examined brain responses to code written in two programing languages: Python, a text-based programming language (Experiment 1) and ScratchJr, a graphical programming language for children (Experiment 2). To isolate neural activity evoked by code comprehension per se rather than by processing program content, we contrasted responses to code problems with responses to content-matched sentence problems. We found that the MD system exhibited strong bilateral responses to code in both experiments. In contrast, the language system responded strongly to sentence problems, but only weakly or not at all to code problems. We conclude that code comprehension relies primarily on domain-general executive resources, demonstrating that the MD system supports the use of novel cognitive tools even when the input is structurally similar to natural language.
doi:10.1101/2020.04.16.045732 fatcat:gucbfmpbavctvji2afqnosf5ni