On Naur's ‘Programming As Theory Building’

Harrison Ainsworth / HXA7241




In ‘Programming As Theory Building’[1] Naur proposes a philosophical model of what programming is. But the current article shows it appears to be based on a contradiction. Instead, it can be improved by adapting a model from physical engineering. The originally proposed implications are sustained, and enlarged with another benefit.

(1500 words)


From the original article:

“A more general background of the presentation is a conviction that it is important to have an appropriate understanding of what programming is. If our understanding is inappropriate we will misunderstand the difficulties that arise in the activity and our attempts to overcome them will give rise to conflicts and frustrations.”

This is what philosophy of software engineering is about [2]. And the current article shares this underlying motivation – it is not about a discovery or invention, but about trying to think clearly about what we already have.


Original model

‘Programming As Theory Building’ proposes that programming is not an outer writing of software code, but an inner building of mental structure. A team gradually learns about the computational form of the problem and solution, and assembles a complex idea of it. This is the indispensable basis and source for any of their work.

The term ‘theory’ is meant as: a kind of knowledge that is intellectual and complex, allowing sophisticated intellectual capability. And in this context, its subject is software.

“programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand.”

This knowledge is built by the programmer at work:

“In terms of Ryle's notion of theory, what has to be built by the programmer is a theory of how certain affairs of the world will be handled by, or supported by, a computer program.”

“programming must involve, as the essential part, a building up of the programmers' knowledge”

And this knowledge is an exclusively human possession, it is not constituted by code and/or documentation:

“This suggestion [of theory building] is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.”

“In arguing for the Theory Building View, the basic issue is to show how the knowledge possessed by the programmer by virtue of his or her having the theory necessarily, and in an essential manner, transcends that which is recorded in the documented products.”

And this knowledge is primary in programming – it directs it and underlies it, as a sine qua non.


On one hand, a ‘theory’ is described as something completely internal and irreducible:

“A main claim of the Theory Building View of programming is that an essential part of any program, the theory of it, is something that could not conceivably be expressed, but is inextricably bound to human beings.”

“the theory, is not, and cannot be, expressed”

“It only makes sense to the agent who has knowledge of the world, that is to the programmer, and cannot be reduced to any limited set of criteria or rules”

But on the other hand, a ‘theory’ is applied to external objects:

“For a program to retain its quality it is mandatory that each modification is firmly grounded in the theory of it.”

“if viewed in relation to the theory of the program these ways [of changing it] may look very different, some of them perhaps conforming to that theory or extending it in a natural way, while others may be wholly inconsistent with that theory”

These cannot both be true. And since the second is actually practised, it must be the first that is wrong.

A ‘theory’ cannot be wholly internal if it is applied to things. If something external conforms to it to some degree, then that thing is to that degree an expression of the ‘theory’. What else is an expression? And, a ‘theory’ cannot be irreducible if it applies to things that are reducible. If it matches something – like software – that is complex and determinate, it must itself be analysable into determinate properties or patterns or structure.

Since ‘theory’ is used to make actual software – something that can fit or diverge from it – ‘theory’ must have a substantial, and complex, objective part.

Replacement model

Solving the original model's inconsistency is straightforward: by properly recognising the objective portion of ‘theory’. Part of ‘theory’ is a matter of inaccessible human apprehension, but part is substantially, complexly accessible. A new model should give this appropriate status. And because the accessible part has scope for useful, practical understanding, it should be given precedence.

The current article proposes that programming is better thought of as: engineering-design of structures in a particular abstract ‘material’. This is really just a careful translation from physical material in civil engineering, substituting in computation time and space. The material takes the place of the objective side of ‘theory’, with digital/computational material having, like physical material, similar general characteristics:

  • The material, and structures of it, are objective and determinate – like mathematics it can produce logically provable, and measurable practically applicable, knowledge.
  • The material has a range of regularity – it permits precise knowledge, as well as supporting rougher yet still reliable guides (as for craft)
  • The material has certain properties, constraints, limitations – a ‘grain’ that makes some structures work better than others, and some manipulations easier than others.
  • Structures of the material can be substantially expressed in code etc. – though they are limited expressions.
  • Structures of the material can be considered and created, in an obscure way, by human thought.

This material is what primarily defines the field of software engineering as distinct from others (not the product, not the activity or process), and the centre which everything fits.

‘Medium’ would perhaps be a closer term, but ‘material’ is more real – which is proabably good for something so abstract and in the background. The aim is, after all, to highlight something half-realised, make it clear, and be a way to prompt or guide thought.

The new model extends and improves the old one. There is still code and program, there is still special human capability, but there is added the first-class concept of an objective determinate material, and its potential for sophisticated understanding. Philosophically, the original model could be seen as a form of ‘idealism’, and the new model a ‘Software Engineering Materialism’.


Original implications

The original model justifies a professional status for programmers. Their work cannot be done by simply following rules, or manipulating text, it requires ‘theory building’.

“the notion of a programming method, understood as a set of rules of procedure to be followed by the programmer, is based on invalid assumptions and so has to be rejected. As further consequences of the view, programmers have to be accorded the status of responsible, permanent developers and managers of the activity of which the computer is a part”

“much current discussion of programming seems to assume that programming is similar to industrial production, the programmer being regarded as a component of that production, a component that has to be controlled by rules of procedure and which can be replaced easily.”

“the notion of the programmer as an easily replaceable component in the program production activity has to be abandoned. Instead the programmer must be regarded as a responsible developer and manager of the activity in which the computer is a part. In order to fill this position he or she must be given a permanent position, of a status similar to that of other professionals, such as engineers and lawyers, whose active contributions as employers of enterprises rest on their intellectual proficiency.”

And so also specifically for software modification:

“the expectation of the possibility of low cost program modifications conceivably finds support in the fact that a program is a text held in a medium allowing for easy editing. For this support to be valid it must clearly be assumed that the dominating cost is one of text manipulation. This would agree with a notion of programming as text production. On the Theory Building View this whole argument is false.”

“the problems of program modification arise from acting on the assumption that programming consists of program text production, instead of recognising programming as an activity of theory building.”

Updated implications

The new model also supports the original implication of professional status: Engineering-design of structures in computational material requires deep knowledge and practised skill – knowledge of the material, of how it can relate to problem domains; skill with engineering-design. Since there is still a basis in complex structures and their mental manipulation, there are the same professional demands.

But the original model has a serious weakness: it doesn't produce anything logically or mathematically structured. Despite the name, ‘theory’ doesn't have the properties of a real theory – being subject to measurement, mathematical modelling, testing. It offers no way of scientific/engineering advance.

The new model's primacy of ‘material’ suggests that a sophisticated knowledge can still be further developed for software. Both at the core, analogous to physics for real material; and less strictly/exactly at its boundary, with respect to the design process. By giving primary status to the area that can be most fruitful of useful knowledge, the new model adds an important benefit.


programming, software engineering, philosophy of software engineering
Creative Commons BY-SA 3.0 License