By Gerd Waloszek, SAP AG, SAP User Experience – April 25, 2008
This review takes a personal look at Casey Reas and Ben Fry's book Processing: A Programming Handbook for Visual Designers and Artists.
![]() |
Reas, Casey & Fry, Ben Processing: A Programming Handbook for Visual Designers and Artists The MIT Press, 2007 ISBN-10: 0262182629, ISBN-13: 978-0262182621 Design: Programming
|
Casey Reas is an associate professor in the Design | Media Arts Department at the University of California, Los Angeles. |
Ben Fry earned his Ph.D. at the MIT Media Laboratory and is a designer in Cambridge, Massachusetts. |
Reas and Fry initiated Processing.org in 2001. Processing is an open source programming language and environment for creating images, animation, and interaction. (From MIT book Website and Casey Reas' homepage, adapted)
Reas and Fry's book about the Processing programming language and its applications for designers and artists comes in at a hefty 600 plus pages and includes a multitude of programming exercises and examples. Regrettably, I have no chance of reading this book and performing the exercises as well as my day-to-day work. So I have to concede that this review is based on scanning the pages to get an overview of the language and its applications. I also read some passages that especially attracted my interest, downloaded a Windows and Apple Macintosh version of the Processing programming environment, ran many of the examples provided with the environment, and finally did a couple of exercises of my own (with both environments). Perhaps I should add that I have a long-standing experience of programming, although I have neglected it in recent years and have little programmed with C-like languages, such as C, C++, and Java. I also have experience with graphics programming. Thus, the fact that I have been programming for decades makes it difficult for me to evaluate whether a book that teaches programming is easy to understand for beginners or not.
The Processing programming language has been taught and refined for of six years – thus, the book is the outcome of extensive teaching experience. According to the authors, successful programming courses have been held for many students all over the world: not only at the MIT where the authors developed the language (encouraged by John Maeda), but also at UCLA and several other locations. However, based on my experience with psychology students, most of whom did not want to get involved in computers, I assume that the situation is similar with design and arts students: The majority of students do not want to be concerned with computers, particularly with programming them. But there are always individuals who are eager to delve into these machines. Since their invention, computers have been used by artists and designers who explored the expressiveness and interactivity of this new medium.
For people who are experienced programmers, it is painful to read a textbook from cover to cover that teaches a programming language. Instead, they try to skim through the book as fast as possible and would preferably proceed directly to the reference section where the language's constructs and syntax are listed – and then jump right into programming. All other readers, however, have to laboriously digest the book at a much slower pace. They learn and need to understand that there are such things as data types, variables, operators, control structures (loops and conditions), and much more – not to mention higher-level concepts, such as the scope of variables, objects, and the like. The Example Walkthrough at the beginning of the book provides a flavor of the kind of concepts introduced in the course of the book, and some people may furrow their brows when they come across "for loops," which, as I found out, are hard to swallow for many beginners.
So what's in the book? The authors answered this question in a number of ways, namely by providing three different tables of contents: (1) a linear table of contents, (2) a nonlinear linear table of contents arranged by category, and (3) an extended table of contents, again in a linear fashion. The latter lists the constructs of the Processing programming language that are discussed in the different chapters of the book. Which one should readers use? I would suggest that beginners use the first one, readers who are in a hurry or are already familiar with programming the second one, and advanced readers who want to know which concepts are covered, the third one. The linear tables of contents are typeset in a very uniform style and are thus not easy to scan.
The contents of the book are divided into four sections, which lack headings. So I do not know the rationale behind the segmentation besides that the sections move from basic to advanced concepts. Each section concludes with a set of interviews with designers and artists about a certain topic or set of topics: print, software and Web, animation and video, and performance and installation.
Figure 1: A demo run of Jared Tarbell's Processing application Substrate by me (the application is described in an interview within the book)
The chapters in the four sections are assigned to specific categories, which makes it easier for readers to get an idea of what a chapter is about: color, control, data, development, drawing, image, input, math, motion, output, shape, simulate, structure, synthesis, transform, and typography. Topics that are relevant to design (for example, text, typography, randomness, mouse and keyboard interactivity, drawing static and kinetic forms, mechanical and organic motion, animation, kinetic type, type response to mouse and keyboard, GUIs, simulation using cellular automata and autonomous agents, motion simulation) are introduced by referring to their history and the people who made important contributions as well as their projects. The second table of contents allows readers who are interested in a specific topic, such as color or typography, to follow all chapters that belong to a certain category in sequence. Where appropriate, code samples are accompanied by one or more pictures showing the outcome of the code. This is very helpful because it tells the reader at a glance what output to expect. Further figures explain the effect of functions and other complex issues. All in all, this is a very visually-minded programming textbook, one which really takes care of its intended target audience.
After the actual "language course," the book continues with eight "extensions." These cover more advanced topics, such as extending Processing and its relationship with Java and other languages, 3D, vision and sound, network, printing, mobile, and finally electronic components. Of course, these extensions are optional reading and are targeted at readers who want to delve more deeply into the matter.
The book also includes a number of appendices that are dedicated to more technical aspects of the Processing language, including a cross-reference of Processing language constructs with other languages that are used for similar purposes. In addition, the book includes a list of related media (texts, Websites, software), a glossary, a code index, and a "normal" index.
When I started scanning and partially reading the book, my initial conclusion was that Processing is similar to other languages that offer graphical commands, such as commands for drawing points, lines, ellipses, and rectangles. This is true as long as you do not proceed further with the book. In addition, Processing's simple, interactive programming environment supported this first impression, because it reminded me of the early BASIC interpreters, in which I could run and test my programs interactively for the first time in my programming life. But it soon turned out that Processing leaves all those languages (including the old Apple Macintosh QuickDraw routines) behind and in the dust. The first time that I was surprised was when vertices were introduced, even though they reminded me of the QuickDraw poly(gon)s. From them on, I "oscillated" between concepts that were advanced but still familiar to me and new, and thus much harder to digest ones. Actually, it was not so much the language itself that I had trouble with, it was the applications and techniques from the visual arts domain. While "trouble" may not be the right word, because I understood the basic ideas, I had left familiar territory (the domain of standard programming languages) and had stepped into a more unknown domain. I had reached the point where technical programming skills are less relevant. Instead, imagination and fantasy are required, characteristics with which "ordinary" programmers and even UI designers may not be not as well equipped as designers and artists. Employing 3D, shading, textures, animation, and typography creatively indeed requires the skills of "real" designers. In the end, I also found out that, unlike C(++) and Visual Basic, Processing is not so much a tool for creating new tools or applications. Rather it is – if I am right – primarily an inspiring tool for creating computer installations for exhibitions or art events.
In the chapter Programming Techniques (p.146), the authors discuss several ways of writing computer programs: modification (for example, changing values of variables, disabling lines of code), augmentation (extending existing programs), collage (putting elements from different programs together to form a new program), and coding from scratch. Usually, I prefer the last approach and rarely look at other people's code. Here, however, it looks as if I am going to apply the first three approaches, because I am not so familiar with the visual arts domain. I have already started with changing a few values in the code examples delivered with Processing. My final goal for a programming project is to create an interesting collage of different code examples. Originally, I wanted to make it available with the initial publication of the review, but I will have to delay this to a later date due to lack of time.
The Processing programming language is an Open Source project and is based on the Java programming language. It uses a somewhat simplified syntax and can be extended with Java code (and also with other languages). In appendix G of the book, interested readers will find a comparison of the Processing language constructs with the constructs of Java and other programming languages that are used in the design field.
The Processing programming environment can be downloaded from the Website www.processing.org. There, readers will find current versions for different operating systems, such as Windows, Mac OS X and Unix/Linux, and further information and support. The programming environment looks rather basic at first sight (see figure 1). It is described in the chapter Using Processing > Environment and consists of the following components:
In addition, a toolbar offers the most often needed commands, and a menu bar provides an extended set of commands.
![]() |
![]() |
Figure 1: The Processing programming environment on the Apple Macintosh (left) and Windows (right)
The results of graphic commands appear in a separate display window (see figure 1). Processing includes two special functions, setup() and draw() (see figure 1 left), which simplify its use as a "drawing tool." The setup() function is used for initializing variables at program startup, while function draw() provides the framework for a continuously running loop. At the end of each cycle, a frame is drawn to the display window. The frame rate is initially set to 60 frames per second but can be changed if needed.
Processing applications can be exported, thereby creating Java applets and an accompanying HTML page for running the applet.
It is hard to review a book that teaches a programming language without also writing about the language itself, particularly if the language is not widely used and little known to programmers. The book itself provides a comprehensive programming course, beginning with simple, easy to understand concepts, and ending with ambitious, professional concepts that require the experience, skills, and imagination of "real" designers. But it offers much more than programming basics by referring to the evolution of certain topics and covering advanced techniques in the eight extension chapters. Even readers who do not intend to learn the language, but are interested in how designers program their projects, will find the interviews interesting. The authors also point out that although the book teaches the Processing language, it "is not about a specific programming language. It strives to make clear the abstract and obscure concepts behind programming, but to do this it's necessary to use examples from a language."
The content and the way the book is organized, differ significantly from other programming textbooks that I have read in the past. This is definitely a positive "tribute" to the Processing language and the book's target audience: designers and artists. Nonetheless, I recommend the book not only to designers but also to everyone interested in programming for the visual arts. The book will be a trusty companion, (nearly) no matter how far readers want to proceed. Nonetheless, a detachable reference card with all the language's commands, operators, convention, and so on would have been a welcome addition to the book.
All in all, though, the book cannot be more than a guide for one's own programming exercises. I have found that you will never master a programming language without extensive practice: In both the real world and the world of programming, there is no fun without effort.