Learning to program involves understanding how the computer executes programs.Code tracing is a simulation of the steps the computer takes to execute a program.The notional machine is an abstract representation of this process. Students form mental models of the notional machine when learning to code trace, but these mental models can be inaccurate or contain misconceptions. We experimentally investigated the effect on learning of using an explicit notional machine or not in a code-tracing lesson for novice programmers (N = 48). We created two versions of a tutoring system, one with a notional machine and one without, using the Cognitive Tutor Authoring Tools framework. The tutors included video lessons and self-explanation prompts to encourage participant engagement. We measured learning as the difference in scores from pretest to posttest, adjusted by prior knowledge. Learning increased overall, but there was no significant difference in learning between groups. i I would like to dedicate this thesis to my grandfather Frantisek (Frank) Fiala who was a founding faculty member of Carleton University's School of Computer Science. He has inspired my love for learning through his example and gentle encouragement, and I am so grateful for that.I would also like to thank my friends and family for constantly cheering me on, especially my mother for her enthusiasm and willingness to hear me talk for hours about the details of my research.Thank you to my committee for your time, input and ideas.Finally, thank you to Dr. Kasia Muldner for making this possible. I greatly appreciate all of the time on discussions and feedback that went into this work. Thank you for being such a kind and helpful supervisor.