Author:
Kuo Chu-Hsuan,Prat Chantel S.
Abstract
AbstractAs computer programming becomes more central to the workforce, the need for better models of how it is effectively learned has become more apparent. The current study addressed this gap by recording electrophysiological brain responses as 62 Python programmers with varying skill levels read lines of code with manipulations of form (syntax) and meaning (semantics). At the group level, results showed that manipulations of form resulted in P600 effects, with syntactically invalid code generating more positive deflections in the 500–800 ms range than syntactically valid code. Meaning manipulations resulted in N400 effects, with semantically implausible code generating more negative deflections in the 300–500 ms range than semantically plausible code. Greater Python expertise within the group was associated with greater sensitivity to violations in form. These results support the notion that skilled programming, like skilled natural language learning, is associated with the incorporation of rule-based knowledge into online comprehension processes. Conversely, programmers at all skill levels showed neural sensitivity to meaning manipulations, suggesting that reliance on pre-existing semantic relationships facilitates code comprehension across skill levels.
Publisher
Springer Science and Business Media LLC
Reference34 articles.
1. Floyd, B., Santander, T. & Weimer, W. Decoding the representation of code in the brain: an fMRI study of code review and expertise. in 2017 IEEE/ACM 39th Int Conf Softw Eng, 175–186 (2017).
2. Ivanova, A. A. et al. Comprehension of computer code relies primarily on domain-general executive brain regions. eLife 9, e58906 (2020).
3. Prat, C. S., Madhyastha, T. M., Mottarella, M. J. & Kuo, C. H. Relating natural language aptitude to individual differences in learning programming languages. Sci. Rep. 10, 3817 (2020).
4. Jenkins, T. On the difficulty of learning to program. Proceedings of the 3rd Annual Conference of the LTSN Centre for Information and Computer Sciences 4, 53–58 (2002).
5. Bennedsen, J. & Caspersen, M. E. Failure rates in introductory programming: 12 years later. ACM Inroads 10, 30–36 (2019).