What is Code?

IMG_2575

One of the best public examples of coding that I've seen can be found at the Boston Museum of Science. There is a table and two people sit at either end. In the middle of the table, there is a vertical partition much like in the game of Battleship. Both people have an identical set of blocks of different shapes, sizes, and colors. One person issues verbal instructions to the other person to build a structure. The other person must rely only on verbal instruction in an attempt to duplicate the structure. Sounds easy, right? It turns out to be rather difficult because when you give instructions, unless they are really precise, the other person's structure will be different. While the terms code and program are generally defined as "a set of instructions," I prefer to define programming (or coding) as constructing an information machine. If the code is on a flat medium such as paper or a computer screen, the machine is created through writing. There are machines, using other paradigms such as data flow, where the machine is drawn rather than written. Others "code" with tangible materials. This idea of generalizing the word "machine" originated with Alan Turing. Turing defined his symbolic artifacts as machine components, with the interacting symbols comprising what computer scientists call a "Turing machine." Coding is akin to making a machine on paper through writing, but more generally, coding is about focusing on the how. How are the colored blocks put together to create a structure? How do you make pancakes? How does your car work? Coding is a type of modeling where the model is something that explains how something works, or how to do something. Today, we code using modern programming languages, most of which are written, but the "code" of the analog Antikythera computer built over two thousand years ago was a bronze gear train.