Understanding how novices reason about coding at a neurological level has implications for training the next generation of software engineers. In recent years, medical imaging has been increasingly employed to investigate patterns of neural activity associated with coding activity. However, such studies have focused on advanced undergraduates and professionals. In a human study of 31 participants, we use functional near-infrared spectroscopy to measure the neural activity associated with introductory programming. In a controlled, contrast-based experiment, we relate brain activity when coding to that of reading natural language or mentally rotating objects (a spatial visualization task). Our primary result is that all three tasks -- coding, prose reading, and mental rotation -- are mentally distinct for novices. However, while those tasks are neurally distinct, we find more significant differences between prose and coding than between mental rotation and coding. Intriguingly, we generally find more activation in areas of the brain associated with spatial ability and task difficulty for novice coding compared to that reported in studies with more expert developers. Finally, in an exploratory analysis, we also find a neural activation pattern predictive of programming performance 11 weeks later. While preliminary, these findings both expand on previous results (e.g., relating expertise to a similarity between coding and prose reading) and also provide a new understanding of the cognitive processes underlying novice programming.
翻译:了解神经系统编码的理由对培训下一代软件工程师有何影响。近年来,医学成像越来越多地被用于调查与编码活动有关的神经活动模式。然而,这类研究侧重于高级本科生和专业人员。在31名参与者的人类研究中,我们使用功能近红外光谱来测量与介绍性编程有关的神经活动。在受控的、以对比为基础的实验中,我们把大脑活动与阅读自然语言或精神旋转对象的编码(空间可视化任务)联系起来。我们的主要结果是,所有三项任务 -- -- 编译、编程阅读和精神旋转 -- -- 都对编译活动有精神上的不同。然而,尽管这些任务在神经学上是不同的,但我们发现在编程和编程之间比精神旋转和编程之间有更大的差异。我们通常发现,在与空间能力和任务有关的大脑领域,与与更专业的开发者所报告的研究相比,我们发现,大脑活动与编程不兼容。最后,在探索性分析中,我们还发现,我们发现所有三项任务 -- 编程中的神经动动模式预测过程在精神上是不同的,同时提供与前几星期后的新的认知性研究结果。这些共同理解,同时提供与前的对前的研读过程的了解。这些结果和后期的理论分析,提供新的理解。