Understanding Similar Code through Comparative ComprehensionFull paper
Any problem in code may have multiple solutions that differ in details large and small. Because modern software development is characterized by an abundance of searchable and reusable code, effective developers must be able to judge not only the meaning of new algorithms but also the differences between alternatives. Therefore, we use a multi-method study to explore how developers perform comparative comprehension— the cognitive activity of understanding how algorithms behave relative to each other.
To explore how developers compare code, we performed a controlled experiment with 16 developers in a mixed think-aloud and interview format and another 95 developers in a survey format. In this experiment, participants investigated whether a pair of code snippets would demonstrate equivalent behavior when run, controlling for differences in behavior, programming languages, algorithmic structures, and meaningful names. Overall, our results describe how comparison fits into learning, reviewing, and reusing code. Our task observations shed light on how developers move between code similarities at different levels—textual, structural, and schematic—when simultaneously inspecting multiple snippets. In our experiment, developers made more accurate conclusions about behavior given similar languages and structures, with names acting as additional evidence in interaction with other cues, but they also overestimated whether behavior is equivalent in many cases. From this, we identify challenges developers face in comprehending alternatives and we highlight opportunities to better support developers in comparison activities.
Thu 15 SepDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 12:30 | Session on Code Comprehension & Help SeekingResearch Papers at San Francesco Room Chair(s): Thomas LaToza George Mason University | ||
11:00 15mTalk | Program-L: Online Help Seeking Behaviors by Blind and Low Vision ProgrammersShort paper Research Papers Jazette Johnson University of California - Irvine, Andrew Begel Carnegie Mellon University, Institute for Software Research, Richard Ladner University of Washington, Denae Ford Microsoft Research DOI | ||
11:15 30mTalk | Pinpoint: A Record, Replay, and Extract System to Support Code Comprehension and ReuseFull paper Research Papers Wengran Wang North Carolina State University, Gordon Fraser University of Passau, Mahesh Bobbadi North Carolina State University, Benyamin Tabarsi North Carolina State University, Tiffany Barnes North Carolina State University, Chris Martens North Carolina State University, Shuyin Jiao North Carolina State University, Thomas Price North Carolina State University DOI | ||
11:45 30mTalk | Understanding Similar Code through Comparative ComprehensionFull paper Research Papers DOI | ||
12:15 15mTalk | Exploring Organization of Computational Notebook Cells in 2D SpaceShort paper Research Papers Jesse Harden Virginia Tech, Elizabeth Christman Virginia Tech, Nurit Kirshenbaum University of Hawaii at Manoa, John Wenskovitch Virginia Tech, Jason Leigh University of Hawai‘i at Mānoa, Chris North Virginia Tech DOI |