Abstract | ||
---|---|---|
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 significant 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 significantly 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. |
Year | DOI | Venue |
---|---|---|
2017 | 10.1145/3106237.3106264 | ESEC/SIGSOFT FSE |
Keywords | Field | DocType |
Programming Languages,Program Understanding | Confusion,Programming language,Programmer,Mistake,Source code,Computer science,Theoretical computer science,Software,Code smell,Code review | Conference |
ISBN | Citations | PageRank |
978-1-4503-5105-8 | 6 | 0.48 |
References | Authors | |
11 | 7 |
Name | Order | Citations | PageRank |
---|---|---|---|
Dan Gopstein | 1 | 8 | 1.85 |
Jake Iannacone | 2 | 6 | 0.48 |
Yu Yan | 3 | 6 | 0.48 |
Lois DeLong | 4 | 10 | 1.71 |
Yanyan Zhuang | 5 | 238 | 21.55 |
Martin K.-C. Yeh | 6 | 6 | 1.49 |
Justin Cappos | 7 | 17 | 4.48 |