As software pervades more and more areas of our professional and personal lives, there is an ever-increasing need to maintain software and for programmers to efficiently write and understand program code. In the first study of its kind, we analyze fixation-related potentials (FRPs) to explore the online processing of program code patterns that are confusing to programmers, but not to the computer (so-called atoms of confusion), and their underlying neurocognitive mechanisms in an ecologically valid setting. Relative to clean counterparts in program code without an atom of confusion, confusing code elicits a late frontal positivity of about 400 to 700 ms after first looking at the atom of confusion. This frontal positivity resembles an event-related potential (ERP) component found during natural language processing that is elicited by unexpected but plausible words in sentence context. Thus, we suggest that the brain engages similar neurocognitive mechanisms in response to unexpected and informative inputs in program code and in natural language. In both domains, these inputs update a comprehender's situation model, which is essential for information extraction from a quickly unfolding input. Our results have far-reaching implications for programming and pave the way for interdisciplinary collaborations between software engineering and psycholinguistics.


翻译:随着软件日益渗透到我们职业和个人生活的各个领域,维护软件的需求以及程序员高效编写和理解程序代码的需求不断增长。在本项开创性研究中,我们通过分析注视相关电位,在生态效度良好的环境中探索令程序员困惑(但对计算机无碍)的程序代码模式(即所谓混淆原子)的在线加工过程及其背后的神经认知机制。相较于不含混淆原子的清晰程序代码,混淆代码会在首次注视混淆原子后约400至700毫秒诱发一个晚期的额叶正波。该额叶正波类似于自然语言加工过程中由句子语境中意外但合理的词语所诱发的事件相关电位成分。因此,我们认为大脑在面对程序代码和自然语言中的意外且富含信息的输入时,会调用相似的神经认知机制。在这两个领域中,此类输入会更新理解者的情境模型,这对于从快速展开的输入中提取信息至关重要。我们的研究结果对编程领域具有深远意义,并为软件工程与心理语言学的跨学科合作开辟了道路。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
专知会员服务
10+阅读 · 2021年1月31日
专知会员服务
16+阅读 · 2021年1月23日
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
视线估计(Gaze Estimation)简介(一):概述
CVer
10+阅读 · 2020年3月18日
自然语言处理中注意力机制综述
AINLP
27+阅读 · 2019年1月21日
换个角度看GAN:另一种损失函数
机器之心
16+阅读 · 2019年1月1日
干货!自然语言处理中的自注意力机制!
全球人工智能
11+阅读 · 2018年3月27日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Arxiv
0+阅读 · 1月13日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员