Skip to content
Book Open access

Transforming Code Patterns into Procedural Abstractions: An Empirical Study of De-com-po-si-tion

Jul 2026 · Annual Conference on Innovation and Technology in Computer Science Education · 0 citations · 48 references
Computer Science

Abstract

Program decomposition is a core skill in computer science that overlaps with program comprehension, refactoring, and design. Decomposition takes many forms, with one common task at the introductory level being the identification and extraction of meaningful abstraction into separate functions. However, there is limited empirical evidence about how the algorithmic structuring of code affects the difficulty of producing a meaningful decomposition. In this paper, we empirically study how different algorithmic implementations of the same underlying task affect students' ability to reason about good abstractions through method extraction. Grounded in a recent framework on code structuring, we design three functionally equivalent versions of the same task that differ only in how two latent functional patterns relate to each other: sequentially, hierarchically, or interleaved. Using a large-scale controlled study with 994 introductory programming students, we examine students' effort in decomposing the programs, the approaches they adopt, and their perceptions of whether the resulting decomposition improves readability and understanding. Our results show that interleaved functional composition is more difficult to decompose, providing initial empirical support for the framework's hypothesized ordering of composition pattern difficulty. Students also perceive their decompositions of the interleaved version to be less easy to read and understand. We also find that students describe many different approaches of decomposing, and we discuss several implications for teaching and future research.

Read PDF