An Experiment on Using Roles of Variables in Teaching Introductory Programming

Roles of variables is a new concept that captures tacit expert knowledge in a form that can be taught in introductory programming courses. A role describes some stereotypic use of variables, and only ten roles are needed to cover 99% of all variables in novice-level programs. This paper presents the results of an experiment where roles were introduced to novices learning Pascal programming. Students were divided into three groups that were instructed differently: in the traditional way with no treatment of roles; using roles throughout the course; and using a role-based program animator in addition to using roles in teaching. The results show that students are not only able to understand the role concept and to apply it in new situations but—more importantly—that roles provide students a new conceptual framework that enables them to mentally process program information in a way demonstrating good programming skills. Moreover, the use of the animator seems to foster the adoption of role knowledge.

[1]  Sally Fincher,et al.  Pedagogical patterns: their place in the genre , 2002, ITiCSE '02.

[2]  Simon P. Davies,et al.  Models and Theories of Programming Strategy , 1993, Int. J. Man Mach. Stud..

[3]  John T. Stasko,et al.  Please address correspondence to , 2000 .

[4]  David Ginat Early Algorithm Efficiency with Design Patterns , 2001, Comput. Sci. Educ..

[5]  Judithe Sheard,et al.  The value of discussion classes for teaching introductory programming , 1998, ITiCSE '98.

[6]  Deborah A. Boehm-Davis,et al.  Empirical Studies of Programmers: Sixth Workshop , 1996 .

[7]  Marcia C. Linn,et al.  Patterns and pedagogy , 1999, SIGCSE '99.

[8]  Jorma Sajaniemi,et al.  An empirical analysis of roles of variables in novice-level procedural programs , 2002, Proceedings IEEE 2002 Symposia on Human Centric Computing Languages and Environments.

[9]  Mordechai Ben-Ari,et al.  Roles of Variables From the Perspective of Computer Science Educators , 2003 .

[10]  Elspeth McKay,et al.  An Investigation of Text‐based Instructional Materials Enhanced with Graphics , 1999 .

[11]  Dung Nguyen Design patterns for data structures , 1998, SIGCSE '98.

[12]  Elliot B. Koffman,et al.  Problem Solving and Program Design in C , 1979 .

[13]  Françoise Détienne,et al.  Software Design — Cognitive Aspects , 2001, Practitioner Series.

[14]  Kate Ehrlich,et al.  An empirical investigation of the tacit plan knowledge in programming , 1984 .

[15]  Susan Wiedenbeck,et al.  Learning Iteration and Recursion from Examples , 1989, Int. J. Man Mach. Stud..

[16]  Brenda Cantwell Wilson,et al.  Contributing to success in an introductory computer science course: a study of twelve factors , 2001, SIGCSE '01.

[17]  Elspeth McKay,et al.  Exploring the Effect of Graphical Metaphors on the Performance of Learning Computer Programming Concepts in Adult Learners: a pilot study , 1999 .

[18]  David Perkins,et al.  Fragile knowledge and neglected strategies in novice programmers , 1985 .

[19]  S. Fincher,et al.  What are we doing when we teach programming? , 1999, FIE'99 Frontiers in Education. 29th Annual Frontiers in Education Conference. Designing the Future of Science and Engineering Education. Conference Proceedings (IEEE Cat. No.99CH37011.

[20]  Robert S. Rist Schema Creation in Programming , 1989, Cogn. Sci..

[21]  Marja Kuittinen,et al.  Program animation based on the roles of variables , 2003, SoftVis '03.

[22]  Jihn-Chang J. Jehng,et al.  A visualisation approach to learning the concept of recursion , 1999, J. Comput. Assist. Learn..

[23]  Tony Jenkins A participative approach to teaching programming , 1998, ITiCSE '98.

[24]  Nancy Pennington,et al.  Comprehension strategies in programming , 1987 .

[25]  Elliot B. Koffman Turbo Pascal: A Problem Solving Approach , 1986 .

[26]  Judith Good Programming paradigms, information types and graphical representations : empirical investigations of novice program comprehension , 1999 .

[27]  P. Pirolli,et al.  The role of learning from examples in the acquisition of recursive programming skills. , 1985 .