Understanding misunderstandings in source code
@article{Gopstein2017UnderstandingMI, title={Understanding misunderstandings in source code}, author={Dan Gopstein and Jake Iannacone and Yu Yan and Lois DeLong and Yanyan Zhuang and Martin K.-C. Yeh and Justin Cappos}, journal={Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering}, year={2017} }
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…
26 Citations
Prevalence of Confusing Code in Software Projects: Atoms of Confusion in the Wild
- Computer Science2018 IEEE/ACM 15th International Conference on Mining Software Repositories (MSR)
- 2018
This work uses a corpus of 14 of the most popular and influential open source C and C++ projects to measure the prevalence and significance of small confusing patterns, demonstrating that beyond simple misunderstanding in the lab setting, atoms of confusion are both prevalent - occurring often in real projects, and meaningful - being removed by bug-fix commits at an elevated rate.
Investigating Misunderstanding Code Patterns in C Open-Source Software Projects (Replication Package)
- Computer Science
- 2018
The study shows that according to developers only some patterns considered previously by researchers may cause misunderstandings, and this results complement previous studies by taking the perception of developers into account.
An investigation of misunderstanding code patterns in C open-source software projects
- Computer ScienceEmpirical Software Engineering
- 2018
The study shows that according to developers only some patterns considered previously by researchers may cause misunderstandings, and this results complement previous studies by taking the perception of developers into account.
Thinking Aloud about Confusing Code
- Psychology
- 2020
Atoms of confusion are small patterns of code that have been empirically validated to be difficult to hand-evaluate by programmers. Previous research focused on defining and quantifying this…
Thinking aloud about confusing code: a qualitative investigation of program comprehension and atoms of confusion
- PsychologyESEC/SIGSOFT FSE
- 2020
It is argued that thinking of confusion as an atomic construct may pose challenges to formulating new candidates for atoms of confusion, and questioned whether hand-evaluation correctness is, itself, a sufficient instrument to study program comprehension.
Atoms of Confusion: The Eyes Do Not Lie
- Computer ScienceSBES
- 2020
The present study evaluates whether developers misunderstand the code in the presence of atoms of confusion with an eye tracker, and confirms that atoms hinder developers' performance and comprehension.
Do Programmers Prefer Predictable Expressions in Code?
- Computer ScienceCogn. Sci.
- 2020
It is found that programmers do prefer more predictable variants in code, and that stronger language models like the transformer align more often and more consistently with these preferences.
Evaluating Code Readability and Legibility: An Examination of Human-centric Studies
- Computer Science2020 IEEE International Conference on Software Maintenance and Evolution (ICSME)
- 2020
This paper model program comprehension as a learning activity by adapting a preexisting learning taxonomy, which indicates that some competencies, e.g., tracing, are often exercised in these evaluations whereas others, E.g, relating similar code snippets, are rarely targeted.
Do People Prefer "Natural" code?
- Computer ScienceArXiv
- 2019
It is found that transformations to Java and Python expressions in a distinct test corpus generally produce program structures that are less common in practice, supporting the theory that the high repetitiveness in code is a matter of deliberate preference.
Does the Introduction of Lambda Expressions Improve the Comprehension of Java Programs?
- Computer ScienceSBES
- 2019
It is argued in this paper that one can improve program comprehension when she applies particular transformations to introduce lambda expressions, and that state-of-the-art models for estimating program readability are not helpful to capture the benefits of a program transformation to introducelambda expressions.
References
SHOWING 1-10 OF 45 REFERENCES
A metric for software readability
- Computer ScienceISSTA '08
- 2008
An automated readability measure is constructed and it is shown that this metric correlates strongly with two traditional measures of software quality, code changes and defect reports and suggests that comments are less important than simple blank lines to local judgments of readability.
From Obfuscation to Comprehension
- Computer Science2015 IEEE 23rd International Conference on Program Comprehension
- 2015
It is suggested that the ideas and experience embedded in obfuscations can be used to learn about comprehension in code comprehension, and known obfuscation techniques are surveyed and used in an attempt to derive metrics for code (in) comprehensibility.
A Taxonomy of Obfuscating Transformations
- Computer Science
- 1997
It is argued that automatic code obfuscation is currently the most viable method for preventing reverse engineering and the design of a code obfuscator is described, a tool which converts a program into an equivalent one that is more diicult to understand and reverse engineer.
Lint, a C Program Checker
- Computer Science
- 1978
This document discusses the use of lint, gives an overview of the implementa- tion, and gives some hints on the writing of machine independent C code.
Understanding understanding source code with functional magnetic resonance imaging
- Computer ScienceICSE
- 2014
This paper explores whether functional magnetic resonance imaging (fMRI), which is well established in cognitive neuroscience, is feasible to soundly measure program comprehension and finds a clear, distinct activation pattern of five brain regions that fit well to the understanding of program comprehension.
Letters to the editor: go to statement considered harmful
- Computer ScienceCACM
- 1968
My considerations are that, although the programmer's activity ends when he has constructed a correct program, the process taking place under control of his program is the true subject matter of his activity, and that his intellectual powers are rather geared to master static relations and his powers to visualize processes evolving in time are relatively poorly developed.
Gotos Considered Harmful and Other Programmers' Taboos
- Computer SciencePPIG
- 2000
A set of common programming taboos is examined, and both social aspects and technical reasons as to why these taboos have arisen are addressed.
Expectations, outcomes, and challenges of modern code review
- Business2013 35th International Conference on Software Engineering (ICSE)
- 2013
This study reveals that while finding defects remains the main motivation for review, reviews are less about defects than expected and instead provide additional benefits such as knowledge transfer, increased team awareness, and creation of alternative solutions to problems.
Improving computer program readability to aid modification
- Computer ScienceCACM
- 1982
As new software is developed, the inventory of programs to be maintained grows, and thus this high level of modification work is not expected to decrease.