skip to main content
10.1145/3230977.3230986acmconferencesArticle/Chapter ViewAbstractPublication PagesicerConference Proceedingsconference-collections
research-article

Towards an Analysis of Program Complexity From a Cognitive Perspective

Published: 08 August 2018 Publication History

Abstract

Instructional designers, examiners, and researchers frequently need to assess the complexity of computer programs in their work. However, there is a dearth of established methodologies for assessing the complexity of a program from a learning point of view. In this article, we explore theories and methods for describing programs in terms of the demands they place on human cognition. More specifically, we draw on Cognitive Load Theory and the Model of Hierarchical Complexity in order to extend Soloway's plan-based analysis of programs and apply it at a fine level of granularity. The resulting framework of Cognitive Complexity of Computer Programs~(CCCP) generates metrics for two aspects of a program: plan depth and maximal plan interactivity. Plan depth reflects the overall complexity of the cognitive schemas that are required for reasoning about the program, and maximal plan interactivity reflects the complexity of interactions between schemas that arise from program composition. Using a number of short programs as case studies, we apply the CCCP to illustrate why one program or construct is more complex than another, to identify dependencies between constructs that a novice programmer needs to learn and to contrast the complexity of different strategies for program composition. Finally, we highlight some areas in computing education and computing education research in which the CCCP could be applied and discuss the upcoming work to validate and refine the CCCP and associated methodology beyond this initial exploration.

References

[1]
Shulamyt Ajami, Yonatan Woodbridge, and Dror G Feitelson . 2017. Syntax, predicates, idioms: what really affects code complexity? Proceedings of the 25th International Conference on Program Comprehension. IEEE Press, 66--76.
[2]
Jens F Beckmann . 2010. Taming a beast of burden--On some issues with the conceptualisation and operationalisation of cognitive load. Learning and instruction Vol. 20, 3 (2010), 250--264.
[3]
Sascha Bernholt and Ilka Parchmann . 2011. Assessing the complexity of students' knowledge in chemistry. Chemistry Education Research and Practice Vol. 12, 2 (2011), 167--173.
[4]
John B Biggs and Kevin F Collis . 2014. Evaluating the quality of learning: The SOLO taxonomy (Structure of the Observed Learning Outcome). Academic Press.
[5]
Benjamin S Bloom et almbox. . 1956. Taxonomy of educational objectives. Vol. 1: Cognitive domain. New York: McKay (1956), 20--24.
[6]
Dennis Bouvier, Ellie Lovellette, John Matta, Bedour Alshaigy, Brett A. Becker, Michelle Craig, Jana Jackova, Robert McCartney, Kate Sanders, and Mark Zarb . 2016. Novice Programmers and the Problem Description Effect Proceedings of the 2016 ITiCSE Working Group Reports (ITiCSE '16). ACM, New York, NY, USA, 103--118.
[7]
Duane Buck and David J. Stucki . 2000. Design early considered harmful: Graduated exposure to complexity and structure based on levels of cognitive development. SIGCSE Bulletin Vol. 32, 1 (2000), 75--79.
[8]
SN Cant, DR Jeffery, and B Henderson-Sellers . 1995. A conceptual model of cognitive complexity of elements of the programming process. Information and Software Technology Vol. 37, 7 (1995), 351 -- 362.
[9]
Francisco Enrique Vicente Castro and Kathi Fisler . 2017. Designing a multi-faceted SOLO taxonomy to track program design skills through an entire course. In Proceedings of the 17th Koli Calling Conference on Computing Education Research. ACM, 10--19.
[10]
Hwan-Hee Choi, Jeroen JG Van Merriënboer, and Fred Paas . 2014. Effects of the physical environment on cognitive load and learning: towards a new model of cognitive load. Educational Psychology Review Vol. 26, 2 (2014), 225--244.
[11]
Tony Clear, Anne Philpott, Phil Robbins, and Simon . 2009. Report on the Eighth BRACElet Workshop: BRACElet Technical Report 01/08. Bulletin of Applied Computing and Information Technology Vol. 7, 1 (2009).
[12]
Michael Lamport Commons . 2008. Introduction to the model of hierarchical complexity and its relationship to postformal action. World Futures Vol. 64, 5--7 (2008), 305--320.
[13]
Michael Lamport Commons, Eric Andrew Goodheart, Alexander Pekker, Theo Linda Dawson, Karen Draney, and Kathryn Marie Adams . 2008. Using Rasch scaled stage scores to validate orders of hierarchical complexity of balance beam task sequences. Journal of Applied Measurement Vol. 9, 2 (2008), 182.
[14]
Michael Lamport Commons, Patrice Marie Miller, Eva Yujia Li, and Thomas Gordon Gutheil . 2012. Forensic experts' perceptions of expert bias. International journal of law and psychiatry Vol. 35, 5--6 (2012), 362--371.
[15]
Michael Lamport Commons, JA Rodriguez, PM Miller, SN Ross, A LoCicero, EA Goodheart, and D Danaher-Gilpin . 2007. Applying the model of hierarchical complexity. Unpublished manuscript (2007).
[16]
Michael Lamport Commons, Edward James Trudeau, Sharon Anne Stein, Francis Asbury Richards, and Sharon R Krause . 1998. Hierarchical complexity of tasks shows the existence of developmental stages. Developmental Review Vol. 18, 3 (1998), 237--278.
[17]
Malcolm Corney, Donna Teague, Alireza Ahadi, and Raymond Lister . 2012. Some empirical results for neo-Piagetian reasoning in novice programmers and the relationship to code explanation questions. In Proceedings of the Fourteenth Australasian Computing Education Conference-Volume 123. Australian Computer Society, Inc., 77--86.
[18]
Nelson Cowan, Emily M Elliott, J Scott Saults, Candice C Morey, Sam Mattox, Anna Hismjatullina, and Andrew RA Conway . 2005. On the capacity of attention: Its estimation and its role in working memory and cognitive aptitudes. Cognitive psychology Vol. 51, 1 (2005), 42--100.
[19]
Theo Linda Dawson . 2002. A comparison of three developmental stage scoring systems. Journal of applied measurement Vol. 3, 2 (2002), 146--189.
[20]
Michael de Raadt . 2008. Teaching programming strategies explicitly to novice programmers. Ph.D. Dissertation. bibinfoschoolUniversity of Southern Queensland.
[21]
Paul Denny, Andrew Luxton-Reilly, Ewan Tempero, and Jacob Hendrickx . 2011. Understanding the Syntax Barrier for Novices. In Proceedings of the 16th Annual Joint Conference on Innovation and Technology in Computer Science Education (ITiCSE '11). ACM, New York, NY, USA, 208--212.
[22]
Benedict du Boulay . 1986. Some difficulties of learning to program. Journal of Educational Computing Research Vol. 2, 1 (1986), 57--73.
[23]
Alireza Ebrahimi . 1994. Novice programmer errors: Language constructs and plan composition. International Journal of Human-Computer Studies Vol. 41, 4 (1994), 457--480.
[24]
Said Elnaffar . 2016. Using Software Metrics to Predict the Difficulty of Code Writing Questions 2016 IEEE Global Engineering Education Conference. 513--518.
[25]
Kathi Fisler . 2014. The recurring rainfall problem. In Proceedings of the tenth annual conference on International computing education research. ACM, 35--42.
[26]
Kathi Fisler and Francisco Enrique Vicente Castro . 2017. Sometimes, Rainfall Accumulates: Talk-Alouds with Novice Functional Programmers Proceedings of the 2017 ACM Conference on International Computing Education Research. ACM, 12--20.
[27]
Kathi Fisler, Shriram Krishnamurthi, and Janet Siegmund . 2016. Modernizing plan-composition studies. In Proceedings of the 47th ACM Technical Symposium on Computing Science Education. ACM, 211--216.
[28]
David Ginat, Eti Menashe, and Amal Taya . 2013. Novice difficulties with interleaved pattern composition. Lecture Notes in Computer Science Vol. 7780 LNCS (2013), 57--67.
[29]
Richard Gluga, Judy Kay, Raymond Lister, and Sabina Kleitman . 2013. Mastering cognitive development theory in computer science education. Computer Science Education Vol. 23, 1 (2013), 24--57.
[30]
Shuchi Grover and Satabdi Basu . 2017. Measuring student learning in introductory block-based programming: Examining misconceptions of loops, variables, and boolean logic Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education. ACM, 267--272.
[31]
Michael Hansen, Robert L Goldstone, and Andrew Lumsdaine . 2013. What makes code hard to understand? arXiv preprint arXiv:1304.5257 (2013).
[32]
Michael E Hansen, Andrew Lumsdaine, and Robert L Goldstone . 2012. Cognitive architectures: A way forward for the psychology of programming Proceedings of the ACM international symposium on New ideas, new paradigms, and reflections on programming and software. ACM, 27--38.
[33]
Felienne Hermans and Efthimia Aivaloglou . 2016. Do code smells hamper novice programming? A controlled experiment on Scratch programs. In Program Comprehension (ICPC), 2016 IEEE 24th International Conference on. IEEE, 1--10.
[34]
Minjie Hu, Michael Winikoff, and Stephen Cranefield . 2012. Teaching novice programming using goals and plans in a visual notation Proceedings of the Fourteenth Australasian Computing Education Conference-Volume 123. Australian Computer Society, Inc., 43--52.
[35]
Cruz Izu, Amali Weerasinghe, and Cheryl Pope . 2016. A study of code design skills in novice programmers using the SOLO taxonomy Proceedings of the 2016 ACM Conference on International Computing Education Research. ACM, 251--259.
[36]
W. Lewis Johnson, Elliot Soloway, Benjamin Cutler, and Steven Draper . 1983. Bug Catalogue: I. Technical Report. Yale University, YaleU/CSD/RR \#286.
[37]
Slava Kalyuga . 2011. Cognitive load theory: How many types of load does it really need? Educational Psychology Review Vol. 23, 1 (2011), 1--19.
[38]
Nadia Kasto and Jacqueline Whalley . 2013. Measuring the difficulty of code comprehension tasks using software metrics The 15th Australasian Computer Education Conference, Vol. Vol. 136. 59--65.
[39]
Bernhard Katzmarski and Rainer Koschke . 2012. Program complexity metrics and programmer opinions Program Comprehension (ICPC), 2012 IEEE 20th International Conference on. IEEE, 17--26.
[40]
Andreas Korbach, Roland Brünken, and Babette Park . 2017. Differentiating Different Types of Cognitive Load: a Comparison of Different Measures. Educational Psychology Review (2017), 1--27.
[41]
Sofia Leite, Jose Carlos Principe, Antonio Carlos Silva, Joao Marques-Teixeira, Michael L Commons, and Pedro Rodrigues . In Review. Connectionist models capture hierarchical complexity transitions in development: discrimination between memory-based and operationally-based transitions. (. In Review).
[42]
Jimmie Leppink, Fred Paas, Cees PM Van der Vleuten, Tamara Van Gog, and Jeroen JG Van Merriënboer . 2013. Development of an instrument for measuring different types of cognitive load. Behavior research methods Vol. 45, 4 (2013), 1058--1072.
[43]
Stanley Letovsky and Elliot Soloway . 1986. Delocalized plans and program comprehension. IEEE Software Vol. 3, 3 (1986), 41.
[44]
Raymond Lister . 2011. Concrete and Other Neo-Piagetian Forms of Reasoning in the Novice Programmer. Proceedings of the Thirteenth Australasian Computing Education Conference Ace (2011), 9--18.
[45]
Raymond Lister, Elizabeth S Adams, Sue Fitzgerald, William Fone, John Hamer, Morten Lindholm, Robert McCartney, Jan Erik Moström, Kate Sanders, Otto Sepp"al"a, et almbox. . 2004. A multi-national study of reading and tracing skills in novice programmers ACM SIGCSE Bulletin, Vol. Vol. 36. ACM, 119--150.
[46]
Raymond Lister, Beth Simon, Errol Thompson, Jacqueline L. Whalley, and Christine Prasad . 2006. Not seeing the forest for the trees: Novice programmers and the SOLO taxonomy Proceedings of the 11th annual SIGCSE conference on Innovation and Technology in Computer Science Education. 118--122.
[47]
Peng Liu and Zhizhong Li . 2012. Task complexity: A review and conceptualization framework. International Journal of Industrial Ergonomics Vol. 42, 6 (2012), 553--568.
[48]
Mike Lopez, Jacqueline Whalley, Phil Robbins, and Raymond Lister . 2008. Relationships between reading, tracing and writing skills in introductory programming. Proceedings of the Fourth International Workshop on Computing Education Research (2008), 101--112.
[49]
Aleksi Lukkarinen and Juha Sorva . 2016. Classifying the Tools of Contextualized Programming Education and Forms of Media Computation. In Proceedings of the 16th Koli Calling International Conference on Computing Education Research (Koli Calling '16). ACM, New York, NY, USA, 51--60.
[50]
Andrew Luxton-Reilly, Brett A Becker, Yingjun Cao, Roger McDermott, Claudio Mirolo, Andreas Mühling, Andrew Petersen, Kate Sanders, Jacqueline Whalley, et almbox. . 2018. Developing Assessments to Determine Mastery of Programming Fundamentals Proceedings of the 2017 ITiCSE Conference on Working Group Reports. ACM, 47--69.
[51]
Andrew Luxton-Reilly and Andrew Petersen . 2017. The Compound Nature of Novice Programming Assessments Proceedings of the Nineteenth Australasian Computing Education Conference. ACM, 26--35.
[52]
Susana Masapanta-Carrión and J. Ángel Velázquez-Iturbide . 2018. A systematic review of the use of Bloom's Taxonomy in computer science education Proceedings of the 49h ACM Technical Symposium on Computer Science Education (SIGCSE '18). ACM, 441--446.
[53]
Thomas J McCabe . 1976. A complexity measure. IEEE Transactions on software Engineering 4 (1976), 308--320.
[54]
Michael McCracken, Vicki Almstrum, Danny Diaz, Mark Guzdial, Dianne Hagan, Yifat Ben-David Kolikant, Cary Laxer, Lynda Thomas, Ian Utting, and Tadeusz Wilusz . 2001. A Multi-national, Multi-institutional Study of Assessment of Programming Skills of First-year CS Students. SIGCSE Bull. Vol. 33, 4 (2001), 125 -- 180.
[55]
Jerry Mead, Simon Gray, John Hamer, Richard James, Juha Sorva, Caroline St. Clair, and Lynda Thomas . 2006. A Cognitive Approach to Identifying Measurable Milestones for Programming Skill Acquisition. SIGCSE Bull. Vol. 38, 4 (June . 2006), 182--194.
[56]
Patrice Marie Miller and Darlene Crone-Todd . 2016. Comparing different ways of using the model of hierarchical complexity to evaluate graduate students. Behavioral Development Bulletin Vol. 21, 2 (2016), 223.
[57]
Briana B Morrison, Brian Dorn, and Mark Guzdial . 2014. Measuring cognitive load in introductory CS: adaptation of an instrument Proceedings of the tenth annual conference on International computing education research. ACM, 131--138.
[58]
Andreas Mühling, Alexander Ruf, and Peter Hubwieser . 2015. Design and first results of a psychometric test for measuring basic programming abilities. In Proceedings of the Workshop in Primary and Secondary Computing Education. ACM, 2--10.
[59]
Laurie Murphy, Sue Fitzgerald, and Scott Grissom . 2015. Bug infestation! A goal-plan analysis of CS2 students' recursive binary tree solutions. In Sigcse '15. 482--487.
[60]
Klaus Oberauer . 2002. Access to information in working memory: exploring the focus of attention. Journal of Experimental Psychology: Learning, Memory, and Cognition Vol. 28, 3 (2002), 411.
[61]
Fred Paas, Juhani E Tuovinen, Huib Tabbers, and Pascal WM Van Gerven . 2003. Cognitive load measurement as a means to advance cognitive load theory. Educational psychologist Vol. 38, 1 (2003), 63--71.
[62]
Kathryn M. Rich, Carla Strickland, T. Andrew Binkowski, Cheryl Moran, and Diana Franklin . 2017. K-8 Learning Trajectories Derived from Research Literature: Sequence, Repetition, Conditionals. In Proceedings of the 2017 ACM Conference on International Computing Education Research (ICER '17). ACM, New York, NY, USA, 182--190.
[63]
Robert S Rist . 1989. Schema creation in programming. Cognitive Science Vol. 13, 3 (1989), 389--414.
[64]
Peter Robinson . 2001. Task complexity, task difficulty, and task production: Exploring interactions in a componential framework. Applied linguistics Vol. 22, 1 (2001), 27--57.
[65]
Yvonne Rogers . 2004. New theoretical approaches for HCI. Annual review of information science and technology Vol. 38, 1 (2004), 87--143.
[66]
Jorma Sajaniemi and Marja Kuittinen . 2005. An experiment on using roles of variables in teaching introductory programming. Computer Science Education Vol. 15, 1 (2005), 59--82.
[67]
Kate Sanders, Marzieh Ahmadzadeh, Tony Clear, Stephen H. Edwards, Mikey Goldweber, Chris Johnson, Raymond Lister, Robert McCartney, Elizabeth Patitsas, and Jaime Spacco . 2013. The Canterbury QuestionBank: Building a repository of multiple-choice CS1 and CS2 questions. In ITICSE'13 Working Group Reports (ITiCSE WGR '13). 33--51.
[68]
Wolfgang Schnotz and Christian Kürschner . 2007. A reconsideration of cognitive load theory. Educational psychology review Vol. 19, 4 (2007), 469--508.
[69]
Otto Sepp"al"a, Petri Ihantola, Essi Isohanni, Juha Sorva, and Arto Vihavainen . 2015. Do we know how difficult the Rainfall Problem is? Proceedings of the 15th Koli Calling Conference on Computing Education Research (Koli Calling '15). ACM, 87--96.
[70]
Judy Sheard, Angela Carbone, Donald Chinn, Tony Clear, Malcolm Corney, Daryl D'Souza, Joel Fenwick, James Harland, Mikko-Jussi Laakso, Donna Teague, et almbox. . 2013. How difficult are exams?: a framework for assessing the complexity of introductory programming exams. In Proceedings of the Fifteenth Australasian Computing Education Conference-Volume 136. Australian Computer Society, Inc., 145--154.
[71]
Judy Sheard, Angela Carbone, Raymond Lister, Beth Simon, Errol Thompson, and Jacqueline L Whalley . 2008. Going SOLO to assess novice programmers. In ACM SIGCSE Bulletin, Vol. Vol. 40. ACM, 209--213.
[72]
Simon, Mike Lopez, Ken Sutton, and Tony Clear . 2009. Surely we must learn to read before we learn to write! Conferences in Research and Practice in Information Technology Series (ACE '09), bibfieldeditorMargaret Hamilton and Tony Clear (Eds.), Vol. Vol. 95. Australian Computer Society, 165--170.
[73]
Elliot Soloway . 1986. Learning to program = Learning to construct mechanisms and explanations. Commun. ACM Vol. 29, 9 (1986), 850--858.
[74]
Elliot Soloway, Jeffrey Bonar, and Kate Ehrlich . 1983. Cognitive strategies and looping constructs: An empirical study. Commun. ACM Vol. 26, 11 (1983), 853--860.
[75]
Juha Sorva . 2013. Notional machines and introductory programming education. ACM Transactions on Computing Education Vol. 13, 2 (2013), 1--31.
[76]
Juha Sorva and Arto Vihavainen . 2016. Break Statement Considered. ACM Inroads Vol. 7, 3 (Aug. . 2016), 36--41.
[77]
James C Spohrer, Elliot Soloway, and Edgar Pope . 1985. A goal/plan analysis of buggy Pascal programs. Human-Computer Interaction Vol. 1, 2 (1985), 163--207.
[78]
Kristian Stålne, Michael Lamport Commons, and Eva Yujia Li . 2014. Hierarchical complexity in physics. Behavioral Development Bulletin Vol. 19, 3 (2014), 62.
[79]
Andreas Stefik and Susanna Siebert . 2013. An empirical investigation into programming language syntax. ACM Transactions on Computing Education (TOCE) Vol. 13, 4 (2013), 19.
[80]
John Sweller . 1988. Cognitive load during problem solving: Effects on learning. Cognitive science Vol. 12, 2 (1988), 257--285.
[81]
John Sweller . 2010. Element interactivity and intrinsic, extraneous, and germane cognitive load. Educational psychology review Vol. 22, 2 (2010), 123--138.
[82]
Donna Teague and Raymond Lister . 2014. Programming: reading, writing and reversing. In Proceedings of the 2014 conference on Innovation & technology in computer science education. ACM, 285--290.
[83]
Ian Utting, Dennis J. Bouvier, Michael E. Caspersen, Allison Elliott Tew, Roger Frye, Yifat Ben-David Kolikant, Mike McCracken, James Paterson, Juha Sorva, Lynda Thomas, and Ta Wilusz . 2013. A fresh look at novice programmers' performance and their teachers' expectations Proceedings of the 2013 ITiCSE working group reports (ITiCSE -WGR '13). ACM, 15--32.
[84]
Jeroen JG Van Merriënboer and Paul A Kirschner . 2017. Ten steps to complex learning: A systematic approach to four-component instructional design. Routledge.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICER '18: Proceedings of the 2018 ACM Conference on International Computing Education Research
August 2018
307 pages
ISBN:9781450356282
DOI:10.1145/3230977
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 August 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. cognitive load theory
  2. complexity
  3. model of hierarchical complexity
  4. plan-composition strategies
  5. program cognitive complexity

Qualifiers

  • Research-article

Funding Sources

Conference

ICER '18
Sponsor:

Acceptance Rates

ICER '18 Paper Acceptance Rate 28 of 125 submissions, 22%;
Overall Acceptance Rate 189 of 803 submissions, 24%

Upcoming Conference

ICER 2025
ACM Conference on International Computing Education Research
August 3 - 6, 2025
Charlottesville , VA , USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)152
  • Downloads (Last 6 weeks)9
Reflects downloads up to 24 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media