Map

Programming as Theory Building

Wiki conceptsoftware-engineeringphilosophy โ†ณ show in map Markdown
title
Programming as Theory Building
type
concept
summary
Naur's 1985 thesis that the primary product of programming is the team's shared mental model; code, docs, and tests are artifacts in service of that theory
tags
software-engineering, philosophy
created
2026-05-10
updated
2026-05-10

Peter Naur's 1985 essay argues that programming is theory building, not text production. The "theory" is a shared mental model โ€” held by the team โ€” of the program: what it does, what it doesn't do, why each design decision was made, what the program's relationship is to the surrounding world, and which extensions are natural vs unnatural.

The strong form of the claim is that the theory cannot be fully written down. Documentation, code, and tests are all projections of the theory, not the theory itself. A new engineer reading all of them in isolation cannot reconstruct the original theory; they can only build a new one, which will be different in subtle ways. This is why maintainers of a long-abandoned codebase make changes that look reasonable in isolation but feel wrong to the original authors โ€” they're operating on a different theory.

Naur uses this to explain a few patterns:

  • Why estimates are unreliable: estimating means projecting work against a theory you don't yet have
  • Why "rewriting from scratch" usually goes badly: you're rebuilding the theory, not just the code
  • Why pair programming and code review work: they transmit theory, not just code
  • Why a program "dies" when its team leaves: the theory leaves with them, and what remains is uninhabitable

Connections that the 2026 LLM discourse has picked up:

  • no-silver-bullet-llms (Bennett): essential complexity sits in the theory; LLMs operate on the artifact
  • mean-free-path-language: how far you can go before mental model and program diverge โ€” a measure of how well a language preserves theory
  • clean-code-coding-agents: code structure matters more with agents because their context window can't hold the team's theory
  • building-syntaqlite-ai: the disciplined AI workflow that worked, after vibe coding failed, was the one where the human still held the theory

Naur's essay is short (~25 pages) and freely available in PDF circulation; the original publication was in Microprocessing and Microprogramming vol. 15.

Discussed on the Computer Science Off Course podcast (S1E1, Felienne Hermans & Hanna Schraffenberger, 2026), which frames theory building as being able to explain and defend a solution and extends it to LLM practice and the CS curriculum โ€” see computer-science-off-course-theory-building.

Sub-pages