Skip to content
Book Open access

How (and How Not) Do Code Complexity Measures Predict Cognitive Load?

Aug 2026 · International Computing Education Research Workshop · pp. 44-58 · 0 citations · 43 references
Computer Science

TL;DR

The unexpected finding from exploratory analyses that easy-to-obtain rankings based on pairwise-comparison sessions involving experts have a much stronger predictive power than static and dynamic measures opens up avenues for follow-up research.

Abstract

Background and Context. Code complexity measures have been used to guide the design of various activities within computing education, such as instructional sequencing and assessment. However, empirical evidence for the link of these measures to actual cognitive difficulties remains mixed, with studies suffering from small sample sizes and non-controlled experimental design. Objectives. We sought to investigate how code complexity measures predict the cognitive load of university students when tracing code and whether their predictive power is moderated by computer science achievement. We also compared how these measures stacked up against the comparative judgment from a 15-member expert panel. Methods. We conducted a preregistered laboratory study to investigate the strength of code complexity measures identified in a recent neuroimaging study as predictors of cognitive load. In this controlled study, N = 551 university students traced a random selection of 24 expert-curated code snippets in their preferred language (Java, Python, or C++), and then reported their cognitive load using two validated measures of cognitive load. We assessed preregistered hierarchical regression models with respect to the predictive strength of the code complexity measures and possible moderation. Findings. Contrary to the findings from the recent neuroimaging study, we could not confirm data-flow complexity to be the strongest predictor of measured cognitive load; instead, the simple source lines of code measure dominated the other code complexity measures. In contrast, expert ratings strongly predicted cognitive load. Implications. In the educational context studied, measuring source lines of code is a simple and effective heuristic for ordering tracing tasks by difficulty and outperforms more sophisticated efforts involving data and control flow. The unexpected finding from our exploratory analyses that easy-to-obtain rankings based on pairwise-comparison sessions involving experts have a much stronger predictive power than static and dynamic measures opens up avenues for follow-up research.

Read PDF

Similar papers

Open access Sep 2026

Impact of automated scoring on interpreting performance and self-regulated learning: evidence from a pedagogical experiment

Confronting the challenges of feedback in traditional interpreting training, this study explores how an automated scoring system affects student interpreters’ performance and self-regulated learning (SRL). Guided by Zimmerman’s cyclical model, the study employed a 14-week quasi-experimental design with two intact class...

Chen Chen, Ting Liu · 0 citations
Open access Oct 2026

Generic and subject-specific dimensions of cognitive activation: Assessing the potential of cognitive activation in mathematics and science tasks

Cognitive activation (CA) is a key dimension of teaching quality, yet its empirical operationalization remains challenging. This study examines the Potential for Cognitive Activation (PCA) in Grade 9 mathematics and science tasks by differentiating generic and subject-specific dimensions. Building on established...

Anna Heinle, Frank Reinhold, Pia Todtenhöfer et al. · 3 citations
Open access Sep 2026

Designing for AI literacy: psychological mechanisms and self-determination

It is demonstrated that instructional design affects AI literacy through differentiated motivational pathways rather than through a uniform activation of all three psychological needs, rather than through a uniform activation of all three psychological needs.

Su-Qian Yu, Yu-Xi Lin, Chen Chen · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.