Evaluating How Novices Utilize Debuggers and Code Execution to Understand Code

Mohammed Hassan, Grace Zeng, Craig Zilles

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Background: Previous work has shown that students can understand more complicated pieces of code through the use of common software development tools (code execution, debuggers) than they can without them. Objectives: Given that tools can enable novice programmers to understand more complex code, we believe that students should be explicitly taught to do so, to facilitate their plan acquisition and development as independent programmers. In order to do so, this paper seeks to understand: (1) the relative utility of these tools, (2) the thought process students use to choose a tool, and (3) the degree to which students can choose an appropriate tool to understand a given piece of code. Method: We used a mixed-methods approach. To explore the relative effectiveness of the tools, we used a randomized control trial study (N = 421) to observe student performance with each tool in understanding a range of different code snippets. To explore tool selection, we used a series of think-Aloud interviews (N = 18) where students were presented with a range of code snippets to understand and were allowed to choose which tool they wanted to use. Findings: Overall, novices were more often successful comprehending code when provided with access to code execution, perhaps because it was easier to test a larger set of inputs than the debugger. As code complexity increased (as indicated by cyclomatic complexity), students become more successful with the debugger. We found that novices preferred code execution for simpler or familiar code, to quickly verify their understanding and used the debugger on more complex or unfamiliar code or when they were confused about a small subset of the code. High-performing novices were adept at switching between tools, alternating from a detail-oriented to a broader perspective of the code and vice versa, when necessary. Novices who were unsuccessful tended to be overconfident in their incorrect understanding or did not display a willingness to double check their answers using a debugger. Implications: We can likely teach novices to independently understand code they do not recognize by utilizing code execution and debuggers. Instructors should teach students to recognize when code is complex (e.g., large number of nested loops present), and to carefully step through these loops using debuggers. We should additionally teach students to be cautious to double check their understanding of the code and to self-Assess whether they are familiar with the code. They can also be encouraged to strategically switch between execution and debuggers to manage cognitive load, thus maximizing their problem-solving capabilities.

Original languageEnglish (US)
Title of host publicationICER 2024 - ACM Conference on International Computing Education Research
PublisherAssociation for Computing Machinery
Pages65-83
Number of pages19
ISBN (Electronic)9798400704765
DOIs
StatePublished - Aug 13 2024
Event20th Annual ACM Conference on International Computing Education Research, ICER 2024 - Melbourne, Australia
Duration: Aug 13 2024Aug 15 2024

Publication series

NameICER 2024 - ACM Conference on International Computing Education Research
Volume1

Conference

Conference20th Annual ACM Conference on International Computing Education Research, ICER 2024
Country/TerritoryAustralia
CityMelbourne
Period8/13/248/15/24

Keywords

  • code comprehension
  • debuggers
  • execution

ASJC Scopus subject areas

  • Computational Theory and Mathematics
  • Computer Science Applications
  • Software
  • Education

Fingerprint

Dive into the research topics of 'Evaluating How Novices Utilize Debuggers and Code Execution to Understand Code'. Together they form a unique fingerprint.

Cite this