J. Sorva, V. Karavirta, A. Korhonen (2007)
Roles of Variables in Teaching
Journal of Information Technology Education, 6, 407-423.
Executive Summary:
Expert programmers possess schemas, abstractions of concrete experiences, which help them solve programming problems and lessen the load on their working memory during problem solving. Possession of schemas is a key difference between novices and experts, which is why instructors need to help students construct them. One recent tool for facilitating schema formation in introductory programming are roles of variables, which represent stereotypes of variable use in computer programs (Sajaniemi, 2002). For instance, a variable with the role STEPPER is assigned values in a systematic and predictable order (e.g. ascending integers 0, 1, 2, ...), whereas a FIXED VALUE is a variable whose value does not change. Roles of variables embody expert programmers tacit knowledge on variable usage patterns, which can be made explicit and taught to novice programmers. A small set of roles covers the vast majority of variable use in introductory-level programs. Prior results obtained through analysis of examination results and observation of students suggest that using roles of variables in introductory programming education can increase students' skills in comprehending and constructing programs (Byckling & Sajaniemi, 2006; Sajaniemi & Kuittinen, 2005). Little has been published about the experiences of teachers in higher education who have adopted roles in their programming courses, or about the methods of instruction that can be used to introduce roles. The main research questions in this paper are: how can instructors benefit from roles of variables while creating and maintaining their teaching materials, and what kind of influence does roles-based instruction have on teaching and learning in general?
In this paper, we present the experiences of two programming teachers, who have adopted roles of variables into their courses. In one of the two courses, a very casual 'lightweight' approach to introducing roles of variables to students was used. In the other course, somewhat more effort was spent on introducing roles to students. We discuss the changes made to our courses, describe the effects that the process had on our teaching methods and materials, and suggest new ideas on how to make use of roles of variables in pedagogy. Using feedback questionnaires and analyses of examination answers, we also explore what impact roles of variables had on our students.
From a teachers point of view, we found roles of variables to be very useful. Roles are concrete and easily linked to code. They help with teaching stepwise refinement of program designs, and can be taught in introductory courses naturally alongside other variable-related concepts, such as type and scope. Roles provided us with new ways to assess and improve our teaching materials and methods.
Our assessment of the impact of roles of variables on CS1 students is in agreement with earlier findings and suggests that roles-based instruction can improve students' programming knowledge, perhaps especially with program comprehension tasks. Not all students involved in our experiment found roles useful for learning programming, however, and our results indicate that more than a lightweight introduction to roles is needed in order for students to adopt them into active use. We conclude that roles of variables are a very promising pedagogical tool for introductory programming teachers.
Available at http://jite.org/documents/Vol6/JITEv6p407-423Sorva280.pdf
Last updated: October 30, 2007