Developing Conceptual Programming Knowledge in Pre-Service Computer Science Teachers: The Role of Programming Patterns

  • Matej Zapušek Faculty of Education, University of Ljubljana, Slovenia
  • Irena Nančovska Šerbec Faculty of Education, University of Ljubljana, Slovenia
Keywords: introductory programming, programming patterns, computational thinking, teachers’ education

Abstract

This study examines how students enrolled in a two-subject teacher programme (computer science and mathematics) at the Faculty of Education, University of Ljubljana, develop a conceptual understanding of programming knowledge through the implementation, recognition and explanation of programming patterns. Based on over 500 programming solutions completed by first- and second-year students, we focus on four foundational patterns: linear search, guarded search, counting and extreme values. The study involved 70 students across different phases, with 17 of them tracked longitudinally over three to four years, examining their ability to recognise programming patterns, explain underlying logic and design related tasks. The results show that the students gradually improved their use of programming patterns, initially producing many redundant or incorrect solutions, which over time shifted towards correct implementations. However, this development was uneven across pattern types and programming constructs. Tasks involving while loops and guarded searches initially proved more challenging, with higher rates of incorrect or redundant solutions in the early phases. A consistent finding across all of the student groups was a substantial gap between the students’ ability to implement patterns and their ability to explain them conceptually. This demonstrates that for loop implementation skills do not automatically transfer to conceptual understanding, especially for more complex cases like guarded search and extreme values. This finding is particularly concerning for prospective educators. Importantly, explanation ability strongly predicted task design quality, underscoring the fact that conceptual mastery directly supports pedagogical competence. These findings highlight the need for explicit instruction on programming patterns in teacher education, not only to support correct implementation but also to build deeper explanatory and pedagogical skills. Emphasising patterns as conceptual tools can help future educators better analyse code, anticipate student difficulties and design effective, pattern-based programming tasks.

Downloads

Download data is not yet available.

References

Abesadze, S., & Nozadze, D. (2020). Make 21st century education: The importance of teaching programming in schools. International Journal of Learning and Teaching, 158–163. https://doi.org/10.18178/ijlt.6.3.158-163

Astrachan, O., Berry, G., Cox, L., & Mitchener, G. (1998). Design patterns: An essential component of CS curricula. In J. Lewis, J. Prey, D. Joyce, & J. Impagliazzo (Eds.), SIGCSE ’98: Proceedings of the Twenty-Ninth SIGCSE Technical Symposium on Computer Science Education (pp. 153–160). Association for Computing Machinery. https://doi.org/https://doi.org/10.1145/273133.273182

Astrachan, O., & Wallingford, E. (1998, August). Loop patterns. Users.cs.duke.edu. http://www.cs.duke.edu/~ola/patterns/plopd/loops.html

Bonar, J., & Soloway, E. (1983). Uncovering principles of novice programming. In J. R. White, L. Landweber, A. Demers, & T. Teitelbaum (Eds.), Proceedings of the 10th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages - POPL ’83 (pp. 10–13). Association for Computing Machinery. https://doi.org/10.1145/567067.567069

Bosco, A., Santiveri, N., & Tesconi, S. (2019). Digital making in educational projects. Center for Educational Policy Studies Journal, 9(3), 51–73. https://doi.org/10.26529/cepsj.629

Fisler, K. (2014). The recurring rainfall problem. In Q. Cutts, B. Simon, & B. Dorn (Eds.), Proceedings of the Tenth Annual Conference on International Computing Education Research (pp. 35–42). Association for Computing Machinery. https://doi.org/10.1145/2632320.2632346

Fuller, U., Johnson, C. G., Ahoniemi, T., Cukierman, D., Hernán-Losada, I., Jackova, J., Lahtinen, E., Lewis, T. L., Thompson, D. M., Riedesel, C., & Thompson, E. (2007). Developing a computer sciencespecific learning taxonomy. ACM SIGCSE Bulletin, 39(4), 152–170. https://doi.org/10.1145/1345375.1345438

Ikotun, A. M., Ezugwu, A. E., Abualigah, L., Abuhaija, B., & Heming, J. (2023). K-means clustering algorithms: A comprehensive review, variants analysis, and advances in the era of big data. Information Sciences, 622, 178–210. https://doi.org/10.1016/j.ins.2022.11.139

Kiesler, N. (2022). Reviewing constructivist theories to help foster creativity in programming education. In 2022 IEEE Frontiers in Education Conference (FIE) (pp. 1–5). IEEE. https://doi.org/10.1109/FIE56618.2022.9962699

Kodinariya, T. M., & Makwana, P. R. (2013). Review on determining number of cluster in K-means clustering. International Journal of Advance Research in Computer Science and Management Studies, 1(6), 90–95. http://ijarcsms.com/docs/paper/volume1/issue6/V1I6-0015.pdf

Lahtinen, E., Ala-Mutka, K., & Järvinen, H.-M. (2005). A study of the difficulties of novice programmers. ACM SIGCSE Bulletin, 37(3), 14–18. https://doi.org/10.1145/1151954.1067453

Lister, R., Adams, E. S., Fitzgerald, S., Fone, W., Hamer, J., Lindholm, M., McCartney, R., Moström, J. E., Sanders, K., Seppälä, O., Simon, B., & Thomas, L. (2004). A multi-national study of reading and tracing skills in novice programmers. ACM SIGCSE Bulletin, 36(4), 119–150. https://doi.org/10.1145/1041624.1041673

Lister, R., Simon, B., Thompson, E., Whalley, J. L., & Prasad, C. (2006). Not seeing the forest for the trees. In R. Davoli, M. Goldweber, & P. Salomoni (Eds.), Proceedings of the 11th Annual SIGCSE Conference on Innovation and Technology in Computer Science Education (pp. 118–122). Association for Computing Machinery. https://doi.org/10.1145/1140124.1140157

Nurollahian, S., Keuning, H., & Wiese, E. (2025, February 16). Teaching well-structured code: A literature review of instructional approaches [Unpublished paper]. Accepted to the 2025 IEEE/ACM 37th International Conference on Software Engineering Education and Training (CSEE&T).

Nurollahian, S., Rafferty, A. N., Brown, N., & Wiese, E. (2024). Growth in knowledge of programming patterns: A comparison study of CS1 vs. CS2 students. In B. Stephenson, J. A. Stone, L. Battestilli, S. A. Rebelsky, & L. Shoop (Eds.), Proceedings of the 55th ACM Technical Symposium on Computer Science Education V. 1 (pp. 979–985). Association for Computing Machinery. https://doi.org/10.1145/3626252.3630865

Nurollahian, S., Rafferty, A. N., & Wiese, E. (2023). Improving assessment of programming pattern knowledge through code editing and revision. In 2023 IEEE/ACM 45th International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET) (pp. 58–69). IEEE. https://doi.org/10.1109/ICSE-SEET58685.2023.00012

Omar, T., Alzahrani, A., & Zohdy, M. (2020). Clustering approach for analyzing the student’s efficiency and performance based on data. Journal of Data Analysis and Information Processing, 08(03), 171–182. https://doi.org/10.4236/jdaip.2020.83010

Proulx, V. K. (2000). Programming patterns and design patterns in the introductory computer science course. In S. Haller (Ed.), Proceedings of the Thirty-First SIGCSE Technical Symposium on Computer Science Education (pp. 80–84). Association for Computing Machinery. https://doi.org/10.1145/330908.331819

Robins, A., Rountree, J., & Rountree, N. (2003). Learning and teaching programming: A review and discussion. Computer Science Education, 13(2), 137–172. https://doi.org/10.1076/csed.13.2.137.14200

Robins, A. V. (2019). Novice programmers and introductory programming. In S. Fincher, & A. V. Robins (Eds.), The Cambridge handbook of computing education research (pp. 327–376). Cambridge University Press. https://doi.org/10.1017/9781108654555.013

Simon, & Snowdon, S. (2011). Explaining program code. In K. Sanders, M. E. Caspersen, & A. Clear (Eds.), Proceedings of the Seventh International Workshop on Computing Education Research (pp. 93–100). Association for Computing Machinery. https://doi.org/10.1145/2016911.2016931

Soloway, E. (1986). Learning to program = learning to construct mechanisms and explanations. Communications of the ACM, 29(9), 850–858. https://doi.org/10.1145/6592.6594

Venables, A., Tan, G., & Lister, R. (2009). A closer look at tracing, explaining and code writing skills in the novice programmer. In M. Clancy, M. Caspersen, & R. Lister (Eds.), Proceedings of the Fifth International Workshop on Computing Education Research Workshop (pp. 117–128). Association for Computing Machinery. https://doi.org/10.1145/1584322.1584336

Vivitsou, M. (2019). Digitalisation in education, allusions and references. Center for Educational Policy Studies Journal, 9(3), 117–136. https://doi.org/10.26529/cepsj.706

Webb, M., Davis, N., Bell, T., Katz, Y. J., Reynolds, N., Chambers, D. P., & Sysło, M. M. (2017). Computer science in K-12 school curricula of the 2lst century: Why, what and when? Education and Information Technologies, 22(2), 445–468. https://doi.org/10.1007/s10639-016-9493-x

Weinman, N., Fox, A., & Hearst, M. A. (2021). Improving instruction of programming patterns with Faded Parsons Problems. In Y. Kitamura, A. Quigley, K. Isbister, T. Igarashi, L. Bjørn, & S. Drucker (Eds.), Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems (pp. 1–4). Association for Computing Machinery. https://doi.org/10.1145/3411764.3445228

Wing, J. M. (2006). Computational thinking. Communications of the ACM, 49(3), 33–35. https://doi.org/10.1145/1118178.1118215

Xie, B., Loksa, D., Nelson, G. L., Davidson, M. J., Dong, D., Kwik, H., Tan, A. H., Hwa, L., Li, M., & Ko, A. J. (2019). A theory of instruction for introductory programming skills. Computer Science Education, 29(2–3), 205–253. https://doi.org/10.1080/08993408.2019.1565235

Yadav, A., Good, J., Voogt, J., & Fisser, P. (2017). Computational thinking as an emerging competence domain. In M. Mulder (Ed.), Competence-based Vocational and Professional Education. Technical and Vocational Education and Training: Issues, Concerns and Prospects, vol 23 (pp. 1051–1067). Springer. https://doi.org/10.1007/978-3-319-41713-4_49

Zapušek, M. (2022). Domenska ontologija programskih vzorcev pri uvodnem programiranju [Domain ontology of programming patterns in introductory programming][Doctoral dissertation, University of Ljubljana]. RUL. https://repozitorij.uni-lj.si/IzpisGradiva.php?id=136467

Zeng, Y., Yang, W., & Bautista, A. (2023). Teaching programming and computational thinking in early childhood education: A case study of content knowledge and pedagogical knowledge. Frontiers in Psychology, 14. https://doi.org/10.3389/fpsyg.2023.1252718

Published
2025-12-19
How to Cite
Zapušek, M., & Nančovska Šerbec, I. (2025). Developing Conceptual Programming Knowledge in Pre-Service Computer Science Teachers: The Role of Programming Patterns. Center for Educational Policy Studies Journal, 15(4), 137–171. https://doi.org/10.26529/cepsj.2130