Theory of a program

The building of the program is the same as the building of the theory of it by and in the team of programmers. During the program life a programmer team possessing its theory remains in active control of the program, and in particular retains control over all modifications. The death of a program happens when the programmer team possessing its theory is dissolved. A dead program may continue to be used for execution in a computer and to produce useful results.The actual state of death becomes visible when demands for modifications of the program cannot be intelligently answered. Revival of a program is the rebuilding of its theory by a new programmer team. – Peter Naur, 1985

This quote is saying that a “theory of the program” is required for a software team to be able to build and work with a program. The program’s theory captures all the nascient knowledge; the structure and interactions of the program, the design goals and where those goals were strayed from, the purpose and assumptions about the program’s users, and much more.

Keeping the theory alive

There are many different attempts to making a “theory of the program” transferrable between engineers, documentation, architecture decision records, pair programming. Some may help, some may not. I won’t discuss these.

The death of a program happens when the team that holds the theory is disbanded, and the theory of the program is lost. I’ve recently seen this happen, it’s sad.

Destroying a theory

Team structure decisions are commonly ‘management’ decisions taken by people managers. The theory of the program is commonly held by the individual contributors. Poor managers will disband a team; or allow it to become disbanded such that the theory of the program is lost, and then blame the individual contributors for not being able to make modifications to the program. This is particularly awful, as it was the managers who caused the theory to be lost, but the individual contributors whose performance is ’evaluated’.

We should evaluate the performance of the managers. Losing the theory of a program is unforgivable, due to the cost of reviving the theory.