ABSTRACT
We propose and evaluate a lightweight strategy for tracing code that can be efficiently taught to novice programmers, building off of recent findings on "sketching" when tracing. This strategy helps novices apply the syntactic and semantic knowledge they are learning by encouraging line-by-line tracing and providing an external representation of memory for them to update. To evaluate the effect of teaching this strategy, we conducted a block-randomized experiment with 24 novices enrolled in a university-level CS1 course. We spent only 5-10 minutes introducing the strategy to the experimental condition. We then asked both conditions to think-aloud as they predicted the output of short programs. Students using this strategy scored on average 15% higher than students in the control group for the tracing problems used the study (p<0.05). Qualitative analysis of think-aloud and interview data showed that tracing systematically (line-by-line and "sketching" intermediate values) led to better performance and that the strategy scaffolded and encouraged systematic tracing. Students who learned the strategy also scored on average 7% higher on the course midterm. These findings suggest that in <1 hour and without computer-based tools, we can improve CS1 students' tracing abilities by explicitly teaching a strategy.
- Alan D. Baddeley and Graham Hitch. 1974. Working Memory. Psychology of Learning and Motivation Vol. 8 (Jan. 1974), 47--89.Google Scholar
Index Terms
- An Explicit Strategy to Scaffold Novice Program Tracing
Recommendations
Factors in novice programmers' poor tracing skills
ITiCSE '07: Proceedings of the 12th annual SIGCSE conference on Innovation and technology in computer science educationNovice programmers' program tracing skills have been found to be poor but the difficulties leading to inefficient tracing are not well known. To study this issue, we conducted exploratory interviews that included program comprehension tasks with novice ...
The Role of Working Memory in Program Tracing
CHI '21: Proceedings of the 2021 CHI Conference on Human Factors in Computing SystemsProgram tracing, or mentally simulating a program on concrete inputs, is an important part of general program comprehension. Programs involve many kinds of virtual state that must be held in memory, such as variable/value pairs and a call stack. In ...
Distributed program tracing
ESEC/FSE 2013: Proceedings of the 2013 9th Joint Meeting on Foundations of Software EngineeringDynamic program analysis techniques depend on accurate program traces. Program instrumentation is commonly used to collect these traces, which causes overhead to the program execution. Various techniques have addressed this problem by minimizing the ...
Comments