ABSTRACT
Motivation. Many people interested in learning a programming language choose online courses to develop their skills. The concept of variables is one of the most foundational ones to learn, but can be hard to grasp for novices. Variables are researched, but to our knowledge, few empirical observations on how the concept is taught in practice exist. Objective. We investigate how the concept of variables, and the respective naming practices, are taught in introductory Massive Open Online Courses (MOOCs) teaching programming languages. Methods. We gathered qualitative data related to variables and their naming from 17 MOOCs. Collected data include connections to other programming concepts, formal definitions, used analogies, and presented names. Results. We found that variables are often taught in close connection to data types, expressions, and program execution and are often explained using the 'variable as a box' analogy. The latter finding represents a stronger focus on 'storing values', than on naming, memory, and flexibility. Furthermore, MOOCs are inconsistent when teaching naming practices. Conclusions. We recommend teachers and researchers to pay deliberate attention to the definitions and analogies used to explain the concept of variables as well as to naming practices, and in particular to variable name meaning.
- Venera Arnaoudova, Massimiliano Di Penta, and Giuliano Antoniol. 2016. Linguistic antipatterns: what they are and how developers perceive them. Empirical Software Engineering 21, 1 (Feb. 2016), 104--158. https://doi.org/10.1007/s10664-014--9350--8Google ScholarDigital Library
- Eran Avidan and Dror G. Feitelson. 2017. Effects of Variable Names on Comprehension: An Empirical Study. In 2017 IEEE/ACM 25th International Conference on Program Comprehension (ICPC). 55--65. https://doi.org/10.1109/ICPC.2017.27Google ScholarDigital Library
- Gal Beniamini, Sarah Gingichashvili, Alon Klein Orbach, and Dror G. Feitelson. 2017. Meaningful Identifier Names: The Case of Single-Letter Variables. In 2017 IEEE/ACM 25th International Conference on Program Comprehension (ICPC). 45--54. https://doi.org/10.1109/ICPC.2017.18Google ScholarDigital Library
- Dave Binkley, Dawn Lawrie, Steve Maex, and Christopher Morrell. 2009. Identifier length and limited programmer memory. Science of Computer Programming 74, 7 (2009), 430--445. https://doi.org/10.1016/j.scico.2009.02.006Google ScholarDigital Library
- Scott Blinman and Andy Cockburn. 2005. Program Comprehension: Investigating the Effects of Naming Style and Documentation. In AUIC.Google Scholar
- Benedict Du Boulay. 1986. Some Difficulties of Learning to Program. Journal of Educational Computing Research 2, 1 (1986), 57--73. https://doi.org/10.2190/3LFX-9RRF-67T8-UVK9 arXiv:https://doi.org/10.2190/3LFX-9RRF-67T8-UVK9Google ScholarCross Ref
- Bruno Caprile and Paolo Tonella. 2000. Restructuring program identifier names. In Proceedings 2000 International Conference on Software Maintenance. IEEE, San Jose, CA, USA, 97--107. https://doi.org/10.1109/ICSM.2000.883022Google ScholarCross Ref
- Roee Cates, Nadav Yunik, and Dror G. Feitelson. 2021. Does Code Structure Affect Comprehension? On Using and Naming Intermediate Variables. In 2021 IEEE/ACM 29th International Conference on Program Comprehension (ICPC). 118--126. https://doi.org/10.1109/ICPC52881.2021.00020Google ScholarCross Ref
- Luca Chiodini, Igor Moreno Santos, Andrea Gallidabino, Anya Tafliovich, André L. Santos, and Matthias Hauswirth. 2021. A Curated Inventory of Programming Language Misconceptions. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1 (Virtual Event, Germany) (ITiCSE '21). Association for Computing Machinery, New York, NY, USA, 380--386. https://doi.org/10.1145/3430665.3456343Google ScholarDigital Library
- Malcolm Corney, Raymond Lister, and Donna Teague. 2011. Early Relational Reasoning and the Novice Programmer: Swapping as the "Hello World" of Relational Reasoning. In Proceedings of the Thirteenth Australasian Computing Education Conference - Volume 114 (Perth, Australia) (ACE '11). Australian Computer Society, Inc., AUS, 95--104.Google ScholarDigital Library
- Dimitrios Doukakis, Maria Grigoriadou, and Grammatiki Tsaganou. 2007. Understanding the programming variable concept with animated interactive analogies. In Proceedings of the 8th Hellenic European Research on Computer Mathematics & its Applications Conference, HERCMA'07.Google Scholar
- Sally Fincher, Johan Jeuring, Craig S. Miller, Peter Donaldson, Benedict du Boulay, Matthias Hauswirth, Arto Hellas, Felienne Hermans, Colleen Lewis, Andreas Mühling, Janice L. Pearce, and Andrew Petersen. 2020. Notional Machines in Computing Education: The Education of Attention. In Proceedings of the Working Group Reports on Innovation and Technology in Computer Science Education (Trondheim, Norway) (ITiCSE-WGR '20). Association for Computing Machinery, New York, NY, USA, 21--50. https://doi.org/10.1145/3437800.3439202Google ScholarDigital Library
- Michelle Gienow. 2017. Code n00b: The (Variable) Naming Is the Hardest Part. https://thenewstack.io/code-n00b-naming-hardest-part/.Google Scholar
- Elena L. Glassman, Lyla Fischer, Jeremy Scott, and Robert C. Miller. 2015. Foobaz: Variable Name Feedback for Student Code at Scale. In Proceedings of the 28th Annual ACM Symposium on User Interface Software & Technology (Charlotte, NC, USA) (UIST '15). Association for Computing Machinery, New York, NY, USA, 609--617. https://doi.org/10.1145/2807442.2807495Google ScholarDigital Library
- Abdul Rahman Mohamad Gobil, Zarina Shukor, and Itaza Afiani Mohtar. 2009. Novice difficulties in selection structure. In 2009 International Conference on Electrical Engineering and Informatics, Vol. 02. 351--356. https://doi.org/10.1109/ICEEI.2009.5254715Google ScholarCross Ref
- Remo Gresta, Vinicius Durelli, and Elder Cirilo. 2021. Naming Practices in Java Projects: An Empirical Study. In XX Brazilian Symposium on Software Quality (Virtual Event, Brazil) (SBQS '21). Association for Computing Machinery, New York, NY, USA, Article 10, 10 pages. https://doi.org/10.1145/3493244.3493258Google ScholarDigital Library
- Shuchi Grover and Satabdi Basu. 2017. Measuring Student Learning in Introductory Block-Based Programming: Examining Misconceptions of Loops, Variables, and Boolean Logic. In Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education (Seattle, Washington, USA) (SIGCSE '17). Association for Computing Machinery, New York, NY, USA, 267--272. https://doi.org/10.1145/3017680.3017723Google ScholarDigital Library
- Felienne Hermans, Alaaeddin Swidan, Efthimia Aivaloglou, and Marileen Smit. 2018. Thinking out of the Box: Comparing Metaphors for Variables in Programming Education. In Proceedings of the 13th Workshop in Primary and Secondary Computing Education (Potsdam, Germany) (WiPSCE '18). Association for Computing Machinery, New York, NY, USA, Article 8, 8 pages. https://doi.org/10.1145/3265757.3265765Google ScholarDigital Library
- Johannes Hofmeister, Janet Siegmund, and Daniel V. Holt. 2017. Shorter identifier names take longer to comprehend. In 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER). 217--227. https://doi.org/10.1109/SANER.2017.7884623Google ScholarCross Ref
- Daniel Keller. 1990. A guide to natural naming. ACM SIGPLAN Notices 25 (1990), 95--102.Google ScholarDigital Library
- Tobias Kohn. 2017. Variable Evaluation: An Exploration of Novice Programmers' Understanding and Common Misconceptions. In Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education (Seattle, Washington, USA) (SIGCSE '17). Association for Computing Machinery, New York, NY, USA, 345--350. https://doi.org/10.1145/3017680.3017724Google ScholarDigital Library
- Ilker Koksal. 2020. The Rise Of Online Learning. https://www.forbes.com/sites/ilkerkoksal/2020/05/02/the-rise-of-online-learning/'sh=28f26e472f3c.Google Scholar
- Dawn Lawrie, Christopher Morrell, Henry Feild, and David Binkley. 2006. What's in a Name? A Study of Identifiers. In 14th IEEE International Conference on Program Comprehension (ICPC'06). 3--12. https://doi.org/10.1109/ICPC.2006.51Google ScholarDigital Library
- Dawn Lawrie, Christopher Morrell, Henry Feild, and David Binkley. 2007. Effective identifier names for comprehension and memory. Innovations in Systems and Software Engineering 3, 4 (Dec. 2007), 303--318. https://doi.org/10.1007/s11334-007-0031--2Google ScholarCross Ref
- Raymond Lister, Colin Fidge, and Donna Teague. 2009. Further Evidence of a Relationship between Explaining, Tracing and Writing Skills in Introductory Programming. In Proceedings of the 14th Annual ACM SIGCSE Conference on Innovation and Technology in Computer Science Education (Paris, France) (ITiCSE '09). Association for Computing Machinery, New York, NY, USA, 161--165. https://doi.org/10.1145/1562877.1562930Google ScholarDigital Library
- Mike Lopez, Jacqueline Whalley, Phil Robbins, and Raymond Lister. 2008. Relationships between reading, tracing and writing skills in introductory programming. In ICER'08 - Proceedings of the ACM Workshop on International Computing Education Research (New York, New York, USA). ACM Press, 101--111. https://doi.org/10.1145/1404520.1404531Google ScholarDigital Library
- Christian D. Newman, Reem S. AlSuhaibani, Michael J. Decker, Anthony Peruma, Dishant Kaushik, Mohamed Wiem Mkaouer, and Emily Hill. 2020. On the generation, structure, and semantics of grammar patterns in source code identifiers. Journal of Systems and Software 170 (2020), 110740. https://doi.org/10.1016/j.jss.2020.110740Google ScholarCross Ref
- Thomas Pelchen and Raymond Lister. 2019. On the Frequency of Words Used in Answers to Explain in Plain English Questions by Novice Programmers. Association for Computing Machinery, New York, NY, USA, 11--20. https://doi.org/10.1145/3286960.3286962Google ScholarDigital Library
- Jorma Sajaniemi. 2002. An empirical analysis of roles of variables in novice-level procedural programs. In Proceedings IEEE 2002 Symposia on Human Centric Computing Languages and Environments. 37--39. https://doi.org/10.1109/HCC.2002.1046340Google ScholarCross Ref
- André L. Santos and Hugo Sousa. 2017. An Exploratory Study of How Programming Instructors Illustrate Variables and Control Flow. In Proceedings of the 17th Koli Calling International Conference on Computing Education Research (Koli, Finland) (Koli Calling '17). Association for Computing Machinery, New York, NY, USA, 173--177. https://doi.org/10.1145/3141880.3141892Google ScholarDigital Library
- Andrea Schankin, Annika Berger, Daniel V. Holt, Johannes C. Hofmeister, Till Riedel, and Michael Beigl. 2018. Descriptive Compound Identifier Names Improve Source Code Comprehension. In Proceedings of the 26th Conference on Program Comprehension (Gothenburg, Sweden) (ICPC '18). Association for Computing Machinery, New York, NY, USA, 31--40. https://doi.org/10.1145/3196321.3196332Google ScholarDigital Library
- Bonita Sharif and Jonathan I. Maletic. 2010. An Eye Tracking Study on camelCase and under_score Identifier Styles. In 2010 IEEE 18th International Conference on Program Comprehension. 196--205. https://doi.org/10.1109/ICPC.2010.41Google ScholarDigital Library
- Alaaeddin Swidan, Alexander Serebrenik, and Felienne Hermans. 2017. How do Scratch Programmers Name Variables and Procedures?. In 2017 IEEE 17th International Working Conference on Source Code Analysis and Manipulation (SCAM). 51--60. https://doi.org/10.1109/SCAM.2017.12Google ScholarCross Ref
- Barbee E. Teasley. 1994. The effects of naming style and expertise on program comprehension. International Journal of Human-Computer Studies 40, 5 (1994), 757--770. https://doi.org/10.1006/ijhc.1994.1036Google ScholarDigital Library
- Leslie J. Waguespack. 1989. Visual Metaphors for Teaching Programming Concepts. SIGCSE Bull. 21, 1 (feb 1989), 141--145. https://doi.org/10.1145/65294.71203Google ScholarDigital Library
Index Terms
- Variables in Practice. An Observation of Teaching Variables in Introductory Programming MOOCs
Recommendations
(How) Should Variables and Their Naming Be Taught in Novice Programming Education?
ICER '22: Proceedings of the 2022 ACM Conference on International Computing Education Research - Volume 2With the growing interest in programming skills in society, programming will inevitably become part of national curricula. The research presented on this poster aims to address programming for everyone and hopes to contribute to the accessibility of ...
Teaching programming by emphasizing self-direction: How did students react to the active role required of them?
Lecturing is known to be a controversial form of teaching. With massed classrooms, in particular, it tends to constrain the active participation of students. One of the remedies applied to programming education is to use technology that can vitalize ...
Teaching Introductory Programming: A Quantitative Evaluation of Different Approaches
Teaching programming to beginners is a complex task. In this article, the effects of three factors—choice of programming language, problem-solving training, and the use of formative assessment—on learning to program were investigated. The study adopted ...
Comments