by Tautvilas Mečinskas

We have been programming for thousands of years

Computer programs are all around us. We interact with them every day. It looks as if software is becoming more and more important to our society. But why do we find programs so necessary to us? Why and when did we start programming? What is the essence of programming? These questions might sound trivial, but I feel that today we still don’t have a good definition of what programming is. Maybe this post can help to change that.

It is pretty hard to define programming because it is so diverse. One can program games, mobile apps, websites, compilers, simulations and much more. In this case it might be helpful to start by breaking down some misconceptions and clarifying what programming is not.

Programming is not science. Science is the art of examining the world and discovering repeatable patterns in it. The scientific method is about making a hypothesis, and then performing experiments to prove or reject it. We don’t use such a method in programming — thus it is not science. Programming is not about discovery, but creativity.

Programming is not math. Yes, there is an aspect of math to programming. Some parts of programs can be expressed as mathematical functions. Writing a Fibonacci number generator is fun, but completely useless without a real-world application. Math in programming is means to an end, not a core part of the process.

Programming is not about electronic computers. Computers are very useful, but not necessary. Programs can be understood and interpreted by human beings as well. Therefore, computers are just tools we use in programming.

So what is programming about? What is at the core of every program — big or small?

Abstractions.

What is abstraction? It is a reduced image of the world. When abstracting, we are converting reality into symbols which can be transmitted as information. The word abstraction originates from two Latin words, which are abs, meaning away from and trahere, meaning to draw. The Latin translation suggests that abstracting implies separating one from the whole.

Is the process of abstraction unique to programming? Not really. It is something that humans have been doing for quite some time now. And our most basic tools of abstraction are the map and the clock.

Archaeologists have discovered stone maps that humans made more than 14,000 years ago. This shows that map-making is fundamental to humans. It is a process of transforming territory into symbols by abstracting it. A map is a way to abstract space. It is a tool that helps us to make sense of surrounding territory so that navigating it will be easier.

A clock, on the other hand, is a way to abstract time. We find the continuous nature of time confusing, so we abstract it. Humans split time into discrete intervals: years, months, days, hours, minutes, seconds. While a map helps us navigate space, a clock helps us navigate time. The predecessor of the clock — the calendar — emerged more than 10,000 years ago.

Giant solar calendar Chankillo was built 2,300 years ago.

What about computers then? They are also tools that deal with abstractions. There are 3 fundamental parts to every computer:

  1. Internal clock — a computer’s way to abstract time
  2. Memory — a computer’s way to abstract space
  3. Processing unit —a computer’s way to perform logical operations

These facilities give computers a way to understand space abstractions and their interactions in abstracted time. This means that programs are abstractions of spacetime, and programming is the art of creating spacetime abstractions. These abstractions help us to navigate reality, and that is why they are so important to us.

And there is one abstraction method that is very similar to programming, but is even older than maps, clocks and calendars: language.

If you look closer at our natural language, you will see that it has all the features necessary to abstract spacetime.

Let’s look at an example sentence:

Go to the garden and pick up some flowers this evening.

The garden and flowers refer to abstracted space. This evening is a way to abstract time. And adds logic to the sentence. Go to and pick up are subroutines.

We can easily transform the sentence above into JavaScript:

whenEvening.then(()=>you.goTo(garden)).then(()=>you.pickUp(flower))

This sentence can be understood by a computer that has definitions of evening, you, flowers, and the necessary subroutines defined.

The problem with natural language is that it has very broad applications. Language can be used not only to communicate information, but also to express feelings and emotions. The best examples of pure natural language programs are laws, board game rules, and instruction manuals.

Code of Hammurabi is one of the oldest natural language programs (photo by Richard / CC BY-NC-SA)

Programming languages, on the other hand, are strict and can only create abstractions. Computers are designed to interpret these abstractions in a very specific and deterministic way.

In order to write computer programs one has to learn how to encode natural language to symbols that computer can understand. This usually requires intricate knowledge of computer architecture and the syntax of the chosen computer language. Thus if you want a computer to understand your reality abstractions, you have to learn how to code.

Computers are tools that can execute rules defined in programs with superhuman speed and precision. They empower us with the ability to construct complex, multilayered abstractions, and transform our programs into truly dynamic and interactive maps of reality.

In many ways, programming is something that all of us already know how to do. The process of reality abstraction is fundamental to human beings. Computer programming is just the most effective way of doing this.