{{{ #!html

Roles of Variables as Seen by CS Educators

Background: Teaching programming involves more than just teaching the syntax and semantics of a programming language. The student must learn how the constructs of the language work together to implement the solution of a problem. This requires knowledge of algorithms, as well as knowledge of programming techniques and paradigms. The primary method of teaching programming is to present examples so that the students can generalize from the examples to general principles of problem solving, but it is also possible to explicitly teach program design techniques. The concept of roles of variables [1] is a classification of the behavior of variables (e.g, the role of a stepper is a generalization of the traditional concept of counters) that can be used in elementary programming education to make programs more understandable and to assist in program design. Variable roles differ from the algorithmic patterns that are frequently used as pedagogical aids, because the concept of roles focuses on the data flow through single variables.

Research question: In this study, we were interested in computer science (CS) educators' attitude to the role concept and individual roles: if CS educators do not find the role concept intuitive and easy to apply, it would be unrealistic to expect them to use roles in teaching.

Theoretical framework: Roles of variables were originally identified by analyzing several introductory Pascal textbooks [1]; later the concept was applied to other programming languages and paradigms resulting in a set of eleven roles that cover practically all variables in object-oriented, procedural, and functional programming [2]. The use of the roles in programming education has been found to improve programming skill development [3, 4].

Methodology: The research materials consisted of web pages divided into three phases: (i) a tutorial introducing the concept of roles of variables with short descriptions of the roles; (ii) training with participants assigning roles to variables in example programs and receiving feedback on their selections; (iii) a test consisting of 24 variables in six programs with results collected by automatic e-mail.  Finally, participants were asked for general comments on the role concept or specific roles. Participants were recruited among CS educators in the authors' countries, as well as on mailing lists on the topics of computer science education and psychology of programming. Participants worked remotely on the web-based material at their own pace.

Major findings: The responses of 51 computer science educators were analyzed. Roles were identified with 85% accuracy, and in typical uses of variables with 93% accuracy. The fact that participants agreed on the roles after such a short introduction is encouraging.  Moreover, increased teaching experience improved the ability to assign roles correctly, and experts had little problem with the role concept. Many participants stated in their comments that they had had problems in remembering the definitions of the roles or that the definitions were ambiguous, but the same participants made only few errors, indicating that they understood, perhaps subconsciously, the deep structure of variables represented by the roles. Participants' comments on the role concept in general were mostly positive, and they believed that roles could contribute to understanding programs.

Recommendations for engineering education: The concept of roles of variables can be used as a pedagogical technique to teach how the constructs of a programming language work together to implement the solution of a problem. It is important to emphasize that we do not regard roles as an end in themselves and we do not think that students should be graded on their ability to assign roles. Instead, roles of variables are design rules and pedagogical aids intended to help novices over the hurdle of learning programming.

References:

[1] Sajaniemi J. (2002) An Empirical Analysis of Roles of Variables in Novice-Level Procedural Programs. Proceedings of IEEE 2002 Symposia on Human Centric Computing Languages and Environments (HCC'02), Arlington, VA, September 2002. IEEE Computer Society, 37-39.

[2] Sajaniemi J., Ben-Ari M., Byckling P., Gerdt P., Kulikova Y. (2006) Roles of Variables in Three Programming Paradigms. Computer Science Education 16(4), 261-279.

[3] Sajaniemi J., Kuittinen M. (2005) An Experiment on Using Roles of Variables in Teaching Introductory Programming. Computer Science Education 15(1), 59-82.

[4] Byckling P., Sajaniemi J. (2006) Roles of Variables and Programming Skills Improvement. Proceedings of the 37th SIGCSE Tehnical Symposium on Computer Science Education (SIGCSE 2006),Houston, USA, March 2006, Association for Computing Machinery, 413-417.

Author 1: Mordechai Ben-Ari moti.ben-ari@weizmann.ac.il

Author 2: Jorma Sajaniemi jorma.sajaniemi@joensuu.fi

Article Link: http://portal.acm.org/citation.cfm?id=1008013&coll=portal&dl=ACM&CFID=9122936&CFTOKEN=32438184

}}} [https://stemedhub.org/groups/cleerhub/wiki/issue:1334 : Back to 2009 Spring/Summer Issue Vol. 4, No. 3] [[Include(issues:footer)]]