Table of Contents
Fetching ...

Systematically Thinking about the Complexity of Code Structuring Exercises at Introductory Level

Georgiana Haldeman, Peter Ohmann, Paul Denny

TL;DR

The paper argues for increasing attention to decomposition and abstraction in introductory programming education, proposing a three-dimensional framework (repetition, code-pattern composition, data dependency) to classify code-structuring task complexity. It provides labeled example tasks and an interactive online repository to generate and explore problems, aiming to support procedural-DA skill development. The authors discuss related work on pattern-based instruction and code quality, and they outline future directions including empirical validation and AI-assisted task generation. The framework and tool are presented as practical means to decouple syntax from higher-level reasoning, enabling scalable, targeted practice in introductory curricula amid AI-driven programming trends.

Abstract

Decomposition and abstraction is an essential component of computational thinking, yet it is not always emphasized in introductory programming courses. In addition, as generative AI further reduces the focus on syntax and increases the importance of higher-level code reasoning, there is renewed opportunity to teach DA explicitly. In this paper, we introduce a framework for systematically assessing the complexity of code structuring tasks, where students must identify and separate meaningful abstractions within existing, unstructured code. The framework defines three dimensions of task complexity, each with multiple levels: repetition, code pattern, and data dependency. To support practical use, we provide example tasks mapped to these levels and offer an interactive tool for generating and exploring DA problems. The framework is designed to support the development of educational tasks that build students' skills with DA in the procedural paradigm.

Systematically Thinking about the Complexity of Code Structuring Exercises at Introductory Level

TL;DR

The paper argues for increasing attention to decomposition and abstraction in introductory programming education, proposing a three-dimensional framework (repetition, code-pattern composition, data dependency) to classify code-structuring task complexity. It provides labeled example tasks and an interactive online repository to generate and explore problems, aiming to support procedural-DA skill development. The authors discuss related work on pattern-based instruction and code quality, and they outline future directions including empirical validation and AI-assisted task generation. The framework and tool are presented as practical means to decouple syntax from higher-level reasoning, enabling scalable, targeted practice in introductory curricula amid AI-driven programming trends.

Abstract

Decomposition and abstraction is an essential component of computational thinking, yet it is not always emphasized in introductory programming courses. In addition, as generative AI further reduces the focus on syntax and increases the importance of higher-level code reasoning, there is renewed opportunity to teach DA explicitly. In this paper, we introduce a framework for systematically assessing the complexity of code structuring tasks, where students must identify and separate meaningful abstractions within existing, unstructured code. The framework defines three dimensions of task complexity, each with multiple levels: repetition, code pattern, and data dependency. To support practical use, we provide example tasks mapped to these levels and offer an interactive tool for generating and exploring DA problems. The framework is designed to support the development of educational tasks that build students' skills with DA in the procedural paradigm.

Paper Structure

This paper contains 14 sections, 7 figures, 1 table.

Figures (7)

  • Figure 1: Example of a decomposition task with repetition that is scaled by a variable amount (Level 3 on the Repetition Dimension in Figure \ref{['fig:repetition']}). For this assignment, the goal is to arrive at a decomposed program that can draw fish of different sizes using ASCII characters. The program can be first decomposed into three functions that draw different parts of the fish. Next, note that each part is scaled vertically and horizontally in relation to the size of the fish. More specifically, the tail and the head are one row larger than the size and the body is twice that vertically. Horizontally, the width of the fish is $4*(size+1)+3$ with increasing/decreasing patterns of two characters between consecutive rows.
  • Figure 2: Code examples of the three pattern composition types: concatenation, inclusion and interleaved for the problem of counting the occurrences of the minimum value in a list of numbers. There are two patterns for this problem: finding the minimum and counting how many times it appears in the list. The solution can compose the two patterns in different ways: first the minimum pattern then the counting pattern (concatenation), the counting pattern gets executed every time a new minimum is found (inclusion), or swap between the two patterns whenever a new minimum has been found (interleaved).
  • Figure 3: Levels of the Repetition Dimension. Identical Level 1 is represented by tasks in which snippets of code are identical copies of each other. Variable Included Level 2 is represented by tasks in which snippets of code are near identical copies of each other except certain parts that can be passed using a parameter. Variable Scaled Level 3 is represented by tasks that are similar in structure with a linear relation between them. An example of a task at the Variable Scaled Level 3 is shown in Figure \ref{['fig:fish']}.
  • Figure 4: Code example for the Non-sequential Data Dependency dimension level. The Rubik's Cube Program computes how many cubes can fit along all the three dimensions of a container and then multiplies them to find the number of cubes that can fit in the container.
  • Figure 5: Levels of the Code Pattern Composition Dimension. Level 1 refers to code compositions where the tasks are completely separated, Level 2 refers to code compositions where one task is a inner part of a larger task and Level 3 refers to code compositions where the code switches from one pattern to another repeatedly. Code examples for these different types of code compositions are shown in Figure \ref{['tab:pattern_composition']}.
  • ...and 2 more figures