Lesson 4: A Brief History of Programming
Computer programming in the sense that we know it is even younger than computers themselves. However, programming machines itself is not as young as you migh think.
What is Programming?
Programming in general is simply being able to give something a set of commands which it can execute on it’s own. This definition can be applied to both living and non-living things. For our purposes, we’ll be sticking with non-living programming.
When programming machines, the methods differ greatly based on the design of the machines. Some machines, like player pianos, work by having discs or drums with pegs or indentations that rotate. When these pegs or indentations come across some mechanism that “reads” them, the machine performs accordingly. In the case of a player piano, it plays a note. You can even think of record players as being programmable machines, with the records being programs.
Computer programming as we know it, involves typing special code, in a digital format, which the computer (or another program known as a compiler or interpreter) can read, and then perform actions accordingly. However, programming the earliest computers was not that simple.
The earliest computers were programmed through the means of either punched cards (or film stock in the case of the Z3), or with a set of switches and patch cables which controlled the flow of the program.
The First Programmable Machine
The first known programmable machine was a mechnical humanoid robot drummer, who could play different patterns on the drum. The drummer was created by Al-Jazari in 1206, to entertain guests at royal drinking parties. It was controlled by a programmamble drum with pegs that you could move. When this drum rotated, it would hit levels which would cause the drummer to hit the drum. It could be programmed to play different patterns and such. It operated in much the way that a player piano does.
Early Computer Programming
When computers were first created they had to be programmed through means such as punched cards (or film stock), which would then give a single to the computer telling it what operation to perform. Early computers didn’t even have monitors, so it would have been impossible to program them as we know. To do these early programs you would need a massive stack of punch cards to do anything significant since one card could only hold a few commands at most.
The ENIAC was programmable by a series of switches and patch cables which in different arrangements would signal different operations to be performed. These physical programming means were one of the reasons the ENIAC needed it’s own room, which it would thoroughly fill up.
What made programming these early computers even more difficult is that each had to have it’s own code, which likely was different from every other machine. Doing things like creating software and distributing it to multiple computers and expecting it to work was impossible.
Two inventions helped solve these problems: The Von Neumann architecture and assembly language.
The Von Neumann architecture was an architecture design which allowed us to store programs in the memory, in digital format (as we do know).
With punch cards and the switches, it was essentially programming at the very lowest level: binary. That means that you’re code essentially looked something like this: 00110011 01100110 11001100, only much longer. Not only was it so lengthy, it also different on each computer. If you tried to run that on 50 different computers, you’d probably get 50 different results.
Assembly language was a step higher, above binary programming. Instead of having to program in binary, you could now program with simple commands like: ADD 5. Not only that, but the assembly language could work on each computer in exactly the same way. Now, if you run it on 50 different computers, you’d probably get the same result.
Higher-level Languages
Assembly language was nice, but still not that great. It was still considered a low-level language (that is, a language tied closely to the hardware). What this means is that if you want to do something like, write code that can handle keyboard input, you may have to have a different program for each type of keyboard. Eventually we progressed to high-level languages.
There were many high-level languages like FORTRAN and COBOL which came out, and were used for a long time. Eventually we had C, which was the progenator to C++, one of the first object-oriented based language.
Object-Oriented programming (OOP) refers to treating things in your program as objects, instead of just lines of code (which would be procedural programming). We’ll discuss these later on. PHP is an object-oriented language, while Javascript is a procedural language, but has some pseudo-OOP abilities.
In this lesson we took a brief look at the history of programming. In our next lesson we’ll discuss more about the difference between high-level and low-level programming languages.




