TY - GEN
T1 - Understanding misunderstandings in source code
AU - Gopstein, Dan
AU - Iannacone, Jake
AU - Yan, Yu
AU - DeLong, Lois
AU - Zhuang, Yanyan
AU - Yeh, Martin K.C.
AU - Cappos, Justin
N1 - Funding Information:
We would like to thank Xiangren łJackž Chen and Hongwei łHenryž Zhou for helping create our instrument and analysis tools. We are grateful to Kristen Walcott and Frank Ritter for helpful suggestions towards improving our paper. Lastly, this work would not be possible without the IOCCC and all of the participants in our experiments to whom we are very thankful for their time and efort. This work was supported in part by NSF grants 1444827 and 1513457.
Publisher Copyright:
© 2017 Copyright held by the owner/author(s).
PY - 2017/8/21
Y1 - 2017/8/21
N2 - Humans often mistake the meaning of source code, and so misjudge a program's true behavior. These mistakes can be caused by extremely small, isolated patterns in code, which can lead to signiicant runtime errors. These patterns are used in large, popular software projects and even recommended in style guides. To identify code patterns that may confuse programmers we extracted a preliminary set of atoms of confusion' from known confusing code. We show empirically in an experiment with 73 participants that these code patterns can lead to a signiicantly increased rate of misunderstanding versus equivalent code without the patterns. We then go on to take larger confusing programs and measure (in an experiment with 43 participants) the impact, in terms of programmer confusion, of removing these confusing patterns. All of our instruments, analysis code, and data are publicly available online for replication, experimentation, and feedback.
AB - Humans often mistake the meaning of source code, and so misjudge a program's true behavior. These mistakes can be caused by extremely small, isolated patterns in code, which can lead to signiicant runtime errors. These patterns are used in large, popular software projects and even recommended in style guides. To identify code patterns that may confuse programmers we extracted a preliminary set of atoms of confusion' from known confusing code. We show empirically in an experiment with 73 participants that these code patterns can lead to a signiicantly increased rate of misunderstanding versus equivalent code without the patterns. We then go on to take larger confusing programs and measure (in an experiment with 43 participants) the impact, in terms of programmer confusion, of removing these confusing patterns. All of our instruments, analysis code, and data are publicly available online for replication, experimentation, and feedback.
KW - Program understanding
KW - Programming languages
UR - http://www.scopus.com/inward/record.url?scp=85030755893&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85030755893&partnerID=8YFLogxK
U2 - 10.1145/3106237.3106264
DO - 10.1145/3106237.3106264
M3 - Conference contribution
AN - SCOPUS:85030755893
T3 - Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering
SP - 129
EP - 139
BT - ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering
A2 - Zisman, Andrea
A2 - Bodden, Eric
A2 - Schafer, Wilhelm
A2 - van Deursen, Arie
PB - Association for Computing Machinery
T2 - 11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2017
Y2 - 4 September 2017 through 8 September 2017
ER -