When I was growing up, computers behaved very differently than computers today.
When I turned the computer on, a black screen appeared and a blinking white
cursor was displayed in the corner (Figure 1). The machine didn’t do
anything until I told it to. To program the computer, I simply began typing
lines of text:
10 HGR
20 LET X = RND (1) * 279
30 LET Y = RND (1) * 191
40 HCOLOR = 1
50 HPLOT 80,90 TO X,Y
60 LET F = F+1
70 IF F > 100 THEN GOTO 90
80 GOTO 20
90 END
This programming language was called Basic and when I typed “run”, the program executed (Figure 2). Contemporary computers can do many things that were not possible in the past – they display high-resolution images, connect to the Web, and process complex data in real-time, but programming languages have changed very little. A program is an exact set of instructions which tells the computer precisely what to do. It is a sequence of formatted words and symbols that encodes ideas into a structure which can be interpreted by a machine. Each programming language is a collection of words and symbols (syntax) with a set of rules defining their use (semantics). Each language allows people to encode their ideas in different ways. In Processing, a language based on the Java language, a program to produce a similar result to Figure 2 could be written like this:
size(279, 191);
int f=0;
while(f < 100) {
float x = random(279);
float y = random(191);
line(80, 90, x, y);
f = f + 1;
}
The first computer languages were developed with the origin of electronic
digital computers in the mid 20th century. These languages were commands encoded
as zeros and ones and their structure was closely aligned with the hardware
of the machine. Because each computer was designed differently, they all had
unique languages tailored for their physical specifications. Each type of
modern microprocessor (e.g. Pentium or PowerPC) also has its own native language.
These fundamental languages are called machine code and they have a direct
correspondence to easier-to-read assembly-languages. For example, Intel 8080
processors have an assembly-language which looks like this [Petzold p.350]:
ORG 0100h
LXI DE, Text
MVI C,9
CALL 5
RET
Text: DB ‘Hello!$’
END
It is more difficult to write programs in assembly languages than with high-level languages like Basic and Java, but when this program is translated into executable machine code, the result is even more difficult for humans to understand:
11 09 01 0E 09 CD 05 00 C9 48 65 6C 6C 6F 21 24
This is the code directly executed by the microprocessor. This program commands the microprocessor to load a 16-bit number into register DE (11 09 01), and then move the value 9 into register C, (0E 09) etc. All programs that run directly on the microprocessor must be translated into similar machine code before they can be run. Machine code is displayed in a format called hexadecimal notation where each alphanumeric symbol 0 to F represents four bits of information. For example, the letter ‘A’ is a short way of writing ‘1010’. The machine code presented above translates into the following binary representation:
0001 0001 0000 1001 0000 0001 0000 1110 0000 1001
1100 1101 0000 0101 0000 0000 1100 1001 0100 1000
0110 0101 0110 1100 0110 1100 0110 1111 0010 0001
0010 0100
It is clear that machine languages are very different from human languages:
they are terse, have strict syntactical rules, and small vocabularies. In
contrast, our human languages are verbose, ambiguous, and contain large vocabularies.
Many programming languages such as Basic and Java are compromises between
the types of languages people are naturally comfortable using (e.g. English,
Korean, Arabic) and the kinds of languages machines require for interpreting
our intentions. Thousands of programming languages have been created and different
ones are useful for performing different kinds of tasks. For example, languages
have been specifically developed for business (COBOL), artificial intelligence
(LISP), and teaching children about geometry (LOGO).
Many programming languages have been designed for visual artists and designers
and while these languages have integrated the vocabulary of the arts, they
impose many constraints which are inappropriate for the thought processes
and methodologies of visually-oriented people. Like their predecessors, these
languages are strict and do not support ambiguity, intuition, or a fluid working
methodology. They impose their own constraints on minds that prefer to function
in other ways and they require strict written expression, rather than supporting
visual nuance. Programming does not need to be this way. Visual artists and
designers have the opportunity to write new languages for defining computation
in hybrid visual and text structures which build on humans inherent visual
perception skills. These languages can be written on top of existing high-level
languages (e.g. Java or C) the same way that the high-level languages are
written on top of assembly language. There is enormous potential waiting to
be released and the development of new languages will radically shift the
kinds of software that are written and who is writing it. One example of a
frequently used visual programming language is Max (Figure 3.), developed
at IRCAM by Miller Puckette in the 1980s. This software has proved its value
in the domain of audio and it is continually being extended into video and
image processing domains while inspiring many groups of artists to build upon
and modify its design.
As explorations in music notation during the middle 20th century by composers such as John Cage and Karlheinz Stockhausen enabled innovation in sound, new software notations in the 21st century will expose unique ways of interacting with machines. Encoding the visual aspects of a program directly with graphic elements allows parts of a program to be described more directly and enhancing the computational elements of a program with visual notation allows other parts of a program to be described more qualitatively. A flexible integrated text and visual notation can use each aspect to its advantage. A programming environments for such a languages should allow for multiple levels of representation so people can operate simultaneously at different levels of abstraction. The concept of these hypothetical future programming environments is not to make programming easier, but to show that it can be different. A new generation of electronic artists are learning to program and are beginning to see this potential. The programming tools and languages they build may radically shift the direction of our culture.
References:
Petzold, Charles. Code, The Hidden Language of Computer Hardware and Software.
Microsoft Press. Redmond, WA. 2000