Programming has art, science and craftmanship in it. It is really hard to capture exactly what it is about, for the various practitioners think about it in assorted ways. In essence, the whole craft is like the huge elephant placed before blind men who all perceive it differently. From my point of view, the core of programming is about extension.
In trying to extend and augement our ability to perform the calculuations that emerge from daily life, we slowly invented the computer. However, a computer system is a set of components that work together to do what computers do. In the end, some of these components tend to be extensions of others. We arrive at a somewhat hierarchical system, but each layer serves as a simple extension of the that which is below. How is that?
Let’s begin with hardware. The computer hardware comes with the CPU, RAM, bus systems, I/O devices etc,. but they are static. They can only do what they were built to do. This set of all the innate functions that the computer hardware in general and the computer’s CPU in particular can do is called its instruction set. At the point of manufacturing these hardware componnents, the creators know little about all the possible uses of the equipment. It is impossible to enumerate all the kinds of operations that will be performed on the hardware. Needless to imagine the details of the operations. Will the hardware be used to run snapChat, or build photoshop? These are all questions that the manufacturers of computers can’t answer or even predict.
However, the very basic nature of computing operations can be captured and implemented in hardware. Some of such operations are:
The short list above is very far away from the complete list of essential hardware operations.
It gets interesting. If hardware is limited, how did we get to this point where all sorts of amazing applications are built on computer systems?
The next extension to the hardware is the sytem software, often called the operating system. However, there are many other system software that are not necessarily operating systems. Since the language spoken by the CPU is limited, a new extension is needed to interface between a wider universe of problems and solutions and the limited universe of the CPU. The system software is crafted to extend the hardware we started with. Like the hardware that the system software is trying to extend, the system software itself is limited. System software designers and builders do not know the details of all the applications that will be run on computers via their software. But they need to get the system software working, so they again do what was done at the layer of the hardware, although at this point it becomes higher level.
At this level of extension, the most essential aspects of the system software are captured, implemented and exposed to the users of the system via an interface called the “system calls.” In essence, the system calls are higher level relative to the hardware, but are lower level relative to the kinds of problems and solutions in the upcoming universes of problems and solutions. What then can be done to resolve this issue?
Like the old good solution of extending hardware, we need to extend the system software. The components that are used to extend the system software are called application programs. Application programs tend to be more dynamic than the relatively static system software and the layers below it. However, it turns out that even application software can be limited. At the point of inception and implememtation, the programmers might not have an idea of the exact information that the applications will be dealing with. They solve this problem in the old school way we have described above; they extend the programs with data.
Application programs are often built for a set of permissible data called input. Most application programs also return results called output. In the same way that application programs extend system software, data or input sets extend static application programs. Such extensions neatly fit together and today we can see how changed our world is. What is the next kind of extension we need?
Our world is made of an infinitude of problems and may be solutions. Resources are scarce. We are constantly faced with the issue of targeting this infinitude with a finite set of tools, ideas and solutions. By extending our relatively finite systems, we achieve wider systems that can tackle the infinite set of probems we began with. Inherently, we try to capture the infite with the finite.