Oct 01 Book Review
Volume Number: 17 (2001)
Issue Number: 10
Column Tag: Book Review
Design By Numbers
Author: John Maeda
Introduction
Design by Numbers is a unique book which takes a visual approach to teaching programming. It is written by John Maeda who is director of the Aesthetics and Computation Group at the MIT (http://acg.media.mit.edu). The book uses a freely downloadable, purpose designed programming language by the same name, DBN for short, downloadable from http://dbn.media.mit.edu. Maeda aims to introduce the concepts of computer programming in a language designed to engage the reader visually. In the first chapter, Maeda states that many people using graphic design tools confuse knowledge and skills. As using the mouse does not require refined motor skills of the traditional arts, using digital design tools has become a matter of memorizing the capabilities and sequences of interaction of these tools. Maeda argues that this use of digital design tools relies on knowledge and is not skill. He then claims that true skill in digital design is in the art of computer programming. Throughout the book this idea surfaces in many forms. Maeda clearly is critical of the unquestioning use of pre-packaged digital tools and the use of the computer to imitate traditional media rather than to explore the computer’s own strengths in visual expression. By contrast, Maeda explores a computational aesthetic in which visual expression and code are tightly coupled. An aesthetic that is appropriate to the digital medium, that fully exploits its true character, and that could not be realized in other media.
Computing & The Arts
Apart from the explanation in the preface and the first chapter by the author himself, there is an interesting foreword by Paola Antonelli, associate curator of the Museum of Modern Art. in which a historical overview of the computer as a creative medium is given. Antonelli tells about how the computer received criticism for changing not only the end result but also the process in art and graphic design. Opponents of the computer in this area criticized the cut and paste habits afforded by the computer and claimed these would lead to trial and error approaches to design at the cost of self-discipline, rigour and strong leading ideas. Antonelli’s comparisons with industrial design and the Arts & Crafts movement are fascinating, but probably a bit too dense to be understandable to those without a design background or interest.
Presentation
The book is beautifully presented in a minimal way using grey tones only. Each chapter starts with interesting illustration, obviously the result of taking the ideas behind DBN to a less restricted programming environment. Using a minimal amount of theory and a great many examples, Mr Maeda takes the reader by the hand and guides him along in a crystal-clear explanation. It is amazing to see how Maeda takes his time and space to explain the advantages of programming concepts such as variables and loops by first showing what the code would look like without these concepts. Maeda takes great care to use small steps so as not to lose his audience. Each example he gives is a fully working program, the use of code snippets is avoided.
Application
There are two versions of the DBN program: an online version which runs within a browser and a standalone local version. Both versions are Java-based. Apart from its suitability for teaching web-based courses, the online version should offer network interactivity. However, I could not get the network features to work, at least not with Mac OS 9.1 and MRJ 2.2.4. Since the online version lacks easy saving, opening and printing of code, the rest of this discussion applies to the standalone version (Figure 1). The left hand side of the DBN window is reserved for a 101x101 pixels grid for visual output called the paper, the right hand side is formed by a text pane for entering and editing code. Six clear buttons — play. stop, open, save, print and beautify — are positioned above the paper. Pushing the beautify button gives the code the proper indentation à la Macromedia Director, making it easier to read. A status bar above the program editing area displays compilation errors and button functionality on roll over. It is a joy to see a program which only offers the bare essentials, yet so much fun.
Figure 1.
On a more critical note, the interface proved to be a bit quirky. The menu structure won’t win any prizes for adhering to Apple’s human interface guidelines. There are two Quit items: one in the Apple menu and one in the DBN menu. The About item in the Apple menu does not activate an about box. There is no File menu as all file related functionality is accessed through the buttons in the window. Though keyboard cut and paste is available, there is no Edit menu. The text editor sometimes goes haywire with the shift key making the cursor jump to the first line of code. Quitting and relaunching corrected the problem.
Another little annoyance is that I could not tell you which version I have worked with. A Get Info in the Finder gives Version n/a. As previously mentioned the About command does not do anything. What makes things worse is that there appear to be two different self extracting archives of DBN for Macintosh floating around the DBN website: a dbn-000114.sea (Fri, Jan 14 2000, 2:58PM) and a dbn.sea (Fri, Nov 17 2000, 12.06AM). While these should just differ in compression (BinHex vs. MacBinary) they in fact result in different executables. The latter has an extra DBN menu with a Save as QuickTime movie menu command. More importantly, it does not run DBN code properly, at least not with MacOS 9.1 and MRJ 2.2.4. Strangely enough, the creation dates of the executables within these archives are the same: Tue, Jan 11, 2000, 10.44 PM. I would recommend that you stay with the dbn-000114.sea archive.
The DBN Language
One of the first things you notice when working with DBN code is the importance of the number 100. The horizontal and vertical dimensions of the paper run from 0 to 100, not from 0 to 99 or from 1 to 100. The greyscales do not run from 0 to 255 but from 0 (white) to 100 (black). For the keyboard and the mouse button 0 stands for up and 100 for down.
In the first four chapters Maeda introduces paper (background grey tone), pen (foreground grey tone) and line. In chapter five and six he uses these building blocks to illustrate the use of variables (more flexible line drawing) and repeats (filled and shaded geometric shapes). Chapter seven is dedicated to the operators addition, subtraction, division and multiplication. These operators too are explained in terms of greater flexibility in moving and shading graphical elements. Chapters 8 and 9 introduce the dot: setting a single pixel. The visual possibilities increase again. Single pixels give the user ‘photographic’ bitmaps, curve drawing, shading along the length of a line etc.
With all the graphical building blocks explained, Maeda uses the second half of the book to introduce more advanced topics. Chapter 10 to 12 tackle nested repeats, questions (conditionals) and commands (subroutines). In visual terms this functionality makes possible things such as shapes that are repeated yet variated, dividing the paper into separate areas, and graphic stamps which can be drawn anywhere on the paper. Chapter 13 to 16 introduce animation, mouse interaction and keyboard interaction. Maeda emphasizes that though you can use the mouse to paint and the keyboard to type letters, other unexpectedly aesthetic couplings are possible. The previously mentioned net memory functionality which I could not get to work on the Mac is discussed in Chapter 17. Chapter 18 ‘Time’ is a bit of a hodge-podge of geometrical transformations, filtering, graphical clocks, and life simulations. Finally, chapter 20 ‘Numbers’ ends with some maths such as distances, functions and random numbers. Unfortunately this last chapter does not have — at least for me — the feel of visual discovery of its predecessors.
Once I had worked my way through the book I realized that though the DBN language may be a bit primitive it contains everything that is needed to experiment with interactive graphics (To give you a flavour of what the language is like Listing 1 and Figure 2 show two of my personal favourites). Things that normally take a while to set up are directly accessible here: animation, mouse and keyboard interactivity. Since the mouse co-ordinate system and the graphics co-ordinate system coincide there is no conversion hassle. The code and your output are visible at the same time: you can inspect your code while looking at the visual result. The DBN ‘environment’ itself is so basic that there is no setting up to do. No multi-layered preference box here. In fact there are no preference settings. You have no choice but to get to work.
Listing 1: Leaving a trail
This program shows a trail of your mouse movements. It uses the bottom line of the paper as an array to store a history of mouse locations. Note the syntax for mouse locations.
Page 182, second column
Paper 100
Pen 50
// Draw a line in 50% grey at the bottom of the paper
Line 0 0 100 0
forever
{
// Store the current mouse co-ordinates
Set H <Mouse 1>
Set V <Mouse 2>
// Fill the paper - apart from the bottom line -
// with black. The bottom line is used as an array.
Field 0 1 100 100 100
// Shift history over
// P, P1, P2, P3 are variables
// Repeat 5 times
Repeat N 0 4
{
Set P (N*2)
Set P1 (P+1)
Set P2 (P+2)
Set P3 (P+3)
Set [P 0] [P2 0]
Set [P1 0] [P3 0]
}
// A stroke of 20 pixels at the bottom
// cannot be drawn to.
Smaller? V 20
{
Set V 20
}
// [10 0] holds the new horizontal mouse co-ordinate,
// [11 0] holds the new vertical mouse co-ordinate.
Set [10 0] H
Set [11 0] V
// [0 0] holds the previous horizontal mouse co-ordinate,
// [1 0] holds the previous vertical mouse co-ordinate.
Set H [0 0]
Set V [1 0]
// Repeat 5 times
// We walk the bottom row of pixels,
// drawing lines from one co-ordinate pair to another.
Repeat N 1 5
{
Set P (N*2)
Set P1 (P+1)
// The further in the repeat loop
// the lighter the shade of grey.
Pen (100/N)
// Draw a line from one co-ordinate pair to another.
Line H V [P 0] [P1 0]
Set H [P 0]
Set V [P1 0]
}
}
Figure 2. Keyboard Flares (page 192, second column). Pressing the keys of the alphabet draws increasingly bright lines. Note the syntax for reading the keyboard.
What’s in it for You?
According to Maeda’s preface, he intends to address those people ‘who were too late for the computer design boom, those who hated the computer when it began to take control, or those who have just begun to take on the computer’. Maeda also says he wrote it for the mathematically challenged and that the language was ‘specifically designed for visual people — artists, designers or anyone who can pick up a pencil and doodle’. However, I feel that here Maeda is either too modest, or afraid to offend programming professionals. This book could indeed serve as a different approach to learning programming for complete newbies, or as an interesting ‘look behind the scene’ for graphic designers. But I think DBN’s use extends beyond programming newbies into the world of programming professionals. For those unfamiliar with interactive graphics programming it may form an interesting introduction to the subject. And even for experienced graphics programmers there may be something in DBN: DBN’s simplicity allows one to concentrate and explore a basic idea without being hampered by stubborn tools. It does not take clairvoyance to see that truly interactive graphics — witness OS X’s dock — will become increasingly important.
I found Mr Maeda’s book challenges the way I think about interactive graphics. I do get excited about trying to port some of these idea to a different language. And if nothing else, if so far you’ve failed to explain to your mum and dad what work you do, this book may be your only hope to give them a glimpse of what programming is about.
Bibliography and References
- Maeda, John (1999). Design by numbers. The MIT Press, MA: Cambridge. ISBN 0-262-13354-7.
- Aesthetics & Computation Group website:
acg.media.mit.edu
- DBN website:
dbn.media.mit.edu.
Tom Djajadiningrat does interaction design research and teaching at the ID-StudioLab of Delft University of Technology. You can reach him at J.P.Djajadiningrat@io.tudelft.nl.