Answers are grounded in this paper and cite their sources.
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.
No takes yet. Share an insight, caveat, or question.
Sajaniemi et al. (2005) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: