Wed 9 Aug 2023 16:30 - 16:55 - Tracing Code

\hspace*{8pt} {\bf Background and context.} ``Explain in Plain English'' (EiPE) questions ask students to explain the high-level purpose of code, requiring them to understand the macrostructure of the program’s intent. A lot is known about techniques that experts use to comprehend code, but less is known about how we should teach novices to develop this capability.

{\bf Objective.} Identify techniques that can be taught to students to assist them in developing their ability to comprehend code and contribute to the body of knowledge of how novices develop their code comprehension skills.

{\bf Method.} We developed interventions that could be taught to novices motivated by previous research about how experts comprehend code: prompting students to identify beacons, identify the role of variables, tracing, and abstract tracing. We conducted think-aloud interviews of introductory programming students solving EiPE questions, varying which interventions each student was taught. Some participants were interviewed multiple times throughout the semester to observe any changes in behavior over time.

{\bf Findings.} Identifying beacons and the specific variable role were rarely helpful, as they didn’t encourage students to integrate their understanding of that piece in relation to other lines of code. However, prompting students to explain each variable’s purpose in this particular program helped them focus on useful subsets of the code, which helped manage cognitive load. Tracing was helpful when students incorrectly recognized programming plans or didn’t understand the behavior of individual lines. Prompting students to pick inputs that potentially contradicted their current understanding of the code was found to be a simple approach to them effectively selecting inputs to trace. Abstract tracing helped students see high-level relationships between variables. In addition, we observed student spontaneously sketching algorithmic visualizations that similarly helped them see relationships between variables.

{\bf Implications.} Because students can get stuck at many points in the process of code comprehension, there seems to be no silver bullet technique that helps in every circumstance. Instead, effective instruction for code comprehension will likely involve teaching a collection of techniques. In addition to these techniques, meta-knowledge about when to apply each technique will need to be learned, but that is left for future research. At present, we recommend teaching a bottom-up, concrete-to-abstract approach.

Wed 9 Aug

Displayed time zone: Central Time (US & Canada) change

16:05 - 16:55
Tracing CodeResearch Papers

Session Chair: Kate Sanders

Evaluating the Utility of Notional Machine Representations to Help Novices Learn to Code Trace
Research Papers
Veronica Chiarelli Carleton University, Nadia Markova Carleton University, Kasia Muldner Carleton University
Evaluating Beacons, the Role of Variables, Tracing, and Abstract Tracing for Teaching Novices to Understand Program Intent
Research Papers
Mohammed Hassan University of Illinois at Urbana-Champaign, Kathryn Cunningham University of Illinois Urbana-Champaign, Craig Zilles University of Illinois at Urbana-Champaign