Programming to Learn Language Models
Short Paper
ISSEP 2026
Tue, Sep 22, 2026Programming to learn is a pedagogical approach in which students implement a program to learn a certain topic. Programming can thus become a powerful medium for understanding topics in many disciplines, including informatics itself.
This short conceptual paper argues that programming to learn can be used to design a sequence of programming activities that use only simple programming language constructs and are suitable for secondary school students to learn about fundamental ideas of language models. Widespread student use of products based on language models calls for activities that demystify their behavior. Without having to deal with the complexity of modern model architectures based on neural networks, students can still experience ideas such as generative text models, training and inference, model parameters, and prompts, intertwined with concrete discussions on issues such as biases, ethical and copyright concerns, and the perception of intelligence.
In this paper, we show that the created activities realize the programming to learn approach through their design. We analyze each activity by breaking it down into a fine-grained sequence of programming tasks, and then map each task to specific learning objectives about language models.