There have been musings over the years as to whether programming is an art or a science. Is code a form of art? Art involves creative skill and imagination – does one need to be creative to write code? Some aspects of designing programs are inherently creative – such as the process of interface design. However programming involves solving problems – which is not art. Is it a science then? Likely not. In the traditional sense of the word science relates to the phenomena of the material universe – life science or physical science. The Science Council in the UK define science as “the pursuit of knowledge and understanding of the natural and social world following a systematic methodology based on evidence”. Hardly programming. There may be elements of scientific thought used in the problem solving and algorithm design aspects of programming, but programming is not a pure science.
It may however, be a craft, which lies somewhere between an art, which relies on some form of talent, and a science, which relies on knowledge.
A craft, is an activity involving skill in making things by hand. Programming as a craft makes sense because it is a combination of skill, experience, and the use of tools. The programming artisan selects tools appropriate to the task at hand, and builds programs with them. Programmers are more like woodworkers than they are biologists or mathematicians. The only difference is that a woodworker produces a physical object, the programmer produces a virtual entity. Like many artisans, programmers also use tools to make new tools.
There may also be some primitive form of engineering involved, but engineering involves the application of scientific and mathematical principles to practical ends. Not so with programming, because there is often no distinct way of solving a problem. We craft a solution based on our experiences, the tools we know, and the information we can find.