Software development involves far more than the mere production of code. It goes beyond writing instructions and knowing specific syntax and grammar rules. So, we may well ask ourselves: what is software and how is it developed? One of the best examinations of this subject was done by Peter Naur – creator of the BNF notation and winner of a Turing award – in his essential article “Programming as Theory Building”. Here’s a summary of his idea.
Naur uses Ryle’s notion of theory as a starting point. In The concept of Mind, a classic work of philosophy on the nature of the mind and human behavior, Ryle develops his notion of theory as part of his analysis of intellectual activity and the manner in which this differs from activity that is merely intelligent. What characterizes the first versus the second is that for intellectual activity the person builds a theory. This theory is understood as the knowledge a person must have in order not only to do things intelligently and well according to certain criteria, but also to be able to explain, answer questions, argue or justify the activity of concern. Having a theory allows the person to detect and correct lapses, to learn from examples, and so on. It should be noted that this notion does not rely on the idea that intelligent behavior depends on following or adhering to rules or methods. For example, to understand Newton’s theory of mechanics, it does not suffice to know that force is equal to mass times acceleration; rather, a person must have an understanding of the way in which Newton’s laws apply to certain aspects of reality so as to be able to recognize and apply the theory to other similar phenomena.
From Ryle, Naur borrows the idea of theory and argues that what has to be built by the programmer is a theory of how certain aspects of the world will be modeled, represented and handled by a software system. This person is able to respond to any demand for modification or adaptation to any change in requirements.
A software program’s life after delivery, that is, its maintenance (remember that this is what occupies most of the life cycle) depends on the people who are responsible for said program having this theory. If the programmer team that possesses the theory is dissolved, the deep knowledge of that materialization of a real problem in code form is lost, producing the death of the software program. The program can continue to be executed, but modifications and enhancements will become increasingly expensive and technical costs will increase.
The theory is a collective property shared between members of the original programmer team. Naur argues that for new generations of programmers to prolong the life of software, it is more important for them to work closely with the original programmers – to learn how the software works and how unexpected program reactions and modifications can be understood within the program theory – than it is for them to become familiar with the code and documentation (though this will certainly help). Thus, communication and the human factor become an important part of software development.
One important consequence of this view is that rebuilding a software program’s theory from documentation alone is impossible. Or the classic Brooks Law, which states that adding manpower to a late software project makes it later.
The fact that programmers spend a considerable amount of development time trying to understand code is a problem intrinsic to software development. What we as programmers are unconsciously doing – though we may know nothing of Naur or Ryle’s Building Theory – is trying to rebuild the theory, to create that mental vision. And this is so because programming belongs to the realm of intellectual, and not merely productive, activity. Therefore, it is still a particularization of the traditional creation problem. An experienced engineer, with a deep knowledge of the problem domain, is able to solve related questions in a way that is consistent with the theory. Why are they always coming up with better and faster ideas? The Austrian writer Stefan Zweig, who was interested in the mystery of creation (artistic, not software) throughout his life, once said that “of all the mysteries of the universe, none is more profound than that of creation […] and who could say where ideas come from?” At least in the case of software, we can say that theory plays a part.
– Peter Naur, Programming as Theory Building
– Ryle, G. The Concept of Mind
– Javier Garzás, Comprendiendo qué es crear software