The History of Coding

Get your textbook online or a free pdf (older version but close enough).

Make: Getting Started With Processing Text Book cover

Getting Started with Processing
Casey Reas, Ben Fry
Second Edition, 2015
Maker Media
ISBN-13: 978-1457187087
ISBN-10: 1457187086

A Brief History of Computer Coding

The history of computing devices and the gizmos used to program them goes way, way, back..

Hardware

Automatons & Music Boxes

The Antikythera Mechanism

150BC
The Antikythera Mechanism could predict the position of the stars and even eclipses!

It used gears as a kind of coding language.

And there's a guy on YouTube who's rebuilding it, Clickspring

Automata from 1206

1206
Al-Jazari described programmable humanoid automata with a programmable drum to control a boat with automatic musicians.

1800 Video of an Automaton programmed with rotating disks

Contemporary Video of Arthur Ganson riffing on the same technique

Jacquard Looms

1804 The Jacquard Loom was programmed to create complex patterns by using a "chain of cards."

Jacquard Loom Programming Cards Individual Jacquard Loom Programming Card

Jacard Loom Programming Card

A Piano Role in a Player Piano

Late 1800s Player Pianos use paper scrolls with wholes punched in them to program a self-playing piano

Computing Machines & Code Breakers

Charles Babbage's Analytical Engine

Mid 1800's
Charles Babbage's Analytical Engine - Never built in his lifetime. The first general-purpose computer

Cover of The Difference Engine, novel by William Gibson and Bruce Sterling

William Gibson and Bruce Sterling wrote a classic Steam Punk scifi novel about what the world would be like if Babbage had succeeded in building his machine.

Jacquard Loom Programming Cards as used by Babbage's Analytical Engine

The Engine would have used punch cards like the Jacquard loom.

Lady Ada Lovelace (1815-1852) was the first person to figure out how to program the non-existent thing.

The Colossus Computer, circa 1943

1943
Colossus Computer, invented to crack German cryptographic codes in WWII

Colussus Computer cooled by a cheap fan

By in large, these machines had fixed programs - they were minimally programmable—reprogramming them meant re-wiring them. The next generation of machines allowed for programming with (usually) punch-cards

Commercial Computers

Univac Copmuter, circa  1951 Different view of Univac Computer, circa  1951

1951 UNIVAC I (UNIVersal Automatic Computer I)

IBM 650 Computer, circa 1950s

1953-1969IBM 650, or "Big Iron."
Coding done with punch-cards

Giant stack of programming cards for the IBM 650 Single Programming Card
NBC Newsroom with mass of IBM 360 computers

1960s & 70s Mainframes rule the world of computing. Computer coding becomes a real thing.

An IBM Personal Computer, circa 1980s

1980s Personal Computing comes of age

Coding

Block diagram of interaction between computer and software layers, from hardware at the bottom, up through the operating system, then into application software, which is what coding creates, and finally the user at the top, interacting with the application software.

Coding creates this

Coding Language Timeline

Here's a good wikipedia article on the history of coding

Types of Coding Languages

Coding languages break down into two major categories: Scripting and Compiled

Compiled Languages

Compiled languages require an intermediary step in order to do what they are intended to do. It has to be run through a process called "compiling" where it's fed through an application that turns it into an "executable" stand-alone application. That is, it will run as an application after it's been compiled. Examples of compiled applications include:

Basically, every program you use on your computer or mobile device. Even programs like Processing!

Without a doubt, C++ is the most common compiled language used today, closely followed by Java.

Here's an example of some code written in C++:

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
 
#define OK 0
#define MOVE_MADE 1
#define OUT_OF_RANGE 2
#define WINNER 3
#define EXIT 666
 
char player[] = {'O', 'X'};
char grid[3][3][2];
int computer = 0;
 
int wins[] = {0, 0, 0, 0, 0, 0, 0, 0}; 
 
void format_grid(){
  int x, y;
  char ch = '\0';
 
  for(x = 0, y = 0; x < 3; x++){
    while(y < 3){
      grid[x][y][0] = ' ';
      grid[x][y][1] = ch;
      y++;
    }
    y = 0;
  }
}

Scripting Languages

Sometimes called Embedded Languages, Scripting languages don't require a compiling step to work. Instead, they depend on another application to run them. Examples of Scripting Languages and their corresponding applications include:

Nice thing is, Scripting Languages are hella easier than compiled languages, and often are free!

Here's an example of some code written in Processing:

void setup() {
  size(480, 120);
}

void draw() {
  if (mousePressed) {
    fill(0);
  } else {
    fill(255);
  }
  ellipse(mouseX, mouseY, 80, 80);
}

Similar to the C++, but missing all that stuff at the top, like #include and #define, and most important, there's no need for a compiler.

Processing

Thinking is more interesting than knowing, but less interesting than looking.

Johann Wolfgang Von Goethe

We tend to break down into different categories of thinking styles:

Artists and designers tend to be visual thinkers (duh!), while coders tend to be Mathematical. This has a lot to do with why so few classes in coding work for designers and artists. (Interesting fact: Research suggests that dyslexia is a symptom of a predominant visual/spatial learner.)

Why Processing

Processing is for people who think visually, not mathematically (although the best mathematicians do often think visually - Albert Einstein with his thought experiments and Micheal Faraday and his intuitions about electro-magnetism)

It makes it possible to get immediate visual results with just a line or two of code. Try that with JavaScript, Java or C++!

Let's Code!

You should install Processing on your own computer. Get it at: https://processing.org/download/

  1. Start up the Processing application
  2. In the application window, type:

PROCESSING

line(10, 80, 30, 40);
  1. Click on the Run button in the upper left corner of the app window
  1. Voila! You just ran your first Processing program!
  1. Now let's extend that with this:

PROCESSING

line(10, 80, 30, 40); // Left line
line(20, 80, 40, 40);
line(30, 80, 50, 40); // Middle line
line(40, 80, 60, 40);
line(50, 80, 70, 40); // Right line
  1. Click on the Run button in the upper left corner of the app window
  1. Let's extend it even more

PROCESSING

background(0);        // Set the black background
stroke(255);          // Set line value to white
strokeWeight(5);      // Set line width to 5 pixels
line(10, 80, 30, 40); // Left line
line(20, 80, 40, 40);
line(30, 80, 50, 40); // Middle line
line(40, 80, 60, 40);
line(50, 80, 70, 40); // Right line
  1. Click on the Run button in the upper left corner of the app window

Cool, huh?

Homework

In your textbook, Getting Started with Processing, read the preface and up to page 12. Wherever you see some code examples, type them out yourself and run them to see what happens.

Get a copy online or use this: getting_started_with_processing.pdf. But having the actual paper book is really handy for taking notes in the margins.

I'm basically going to have you type out every example in the book, so get used to it!