
TL;DR
This study identifies and tests 'atoms of confusion' in Java code, revealing that these small confusing patterns significantly increase error rates and perceived confusion among novice developers.
Contribution
The paper adapts the concept of atoms of confusion from C to Java, providing empirical evidence of their impact on novice programmers' understanding and mistakes.
Findings
Participants are 2.7 to 56 times more likely to err with certain atoms.
Affected code snippets are perceived as more confusing and less readable.
Seven out of fourteen studied atoms significantly increase mistakes.
Abstract
Although writing code seems trivial at times, problems arise when humans misinterpret what the code actually does. One of the potential causes are "atoms of confusion", the smallest possible patterns of misinterpretable source code. Previous research has investigated the impact of atoms of confusion in C code. Results show that developers make significantly more mistakes in code where atoms are present. In this paper, we replicate the work of Gopstein et al. to the Java language. After deriving a set of atoms of confusion for Java, we perform a two-phase experiment with 132 computer science students (i.e., novice developers). Our results show that participants are 2.7 up to 56 times more likely to make mistakes in code snippets affected by 7 out of the 14 studied atoms of confusion, and when faced with both versions of the code snippets, participants perceived the version affected by…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
