Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Processing : creative coding and computational art
Greenberg I., Friends of ED, 2007. 840 pp. Type: Book (9781590596173)
Date Reviewed: Oct 3 2007

Some books in computing (as in any field) are gloriously good: well written, clear, and fun to read--a real joy. On the other hand, some books are just plain bad. And, sometimes, there is one that manages to be both at once. This is one of those: there is much good in here, but there is also much to regret.

The book is intended as an introduction to programming for designers and artists using the Processing language and environment, a language designed “by artists for artists” and available as open source. It contains 13 chapters, and begins with a relatively gentle introduction to Processing. It continues with chapters focusing on imaging, animation, and three-dimensional (3D) graphics. The book includes an index and introductory material. Programs (mostly complete programs) are a large part of the book, and all of the programs are available on the publisher’s Web site.

The author is enthusiastic and is clearly having great fun writing programs; the examples presented are a reflection of this. The best part is that this enthusiasm and fun carry over to the reader, so this would be a great book to start with for anyone wanting to learn programming. All the more so since almost every example does something graphical (except in the chapter on object-oriented programming, where almost no program does anything graphical). Because of the overhead of doing graphics programming in most languages, doing graphics in introductory courses is sometimes difficult. If you can get around this, programming graphics is a good way to demonstrate important programming concepts, and rewards the programmer with instant visual feedback. Even better (as the author mentions), sometimes even bugs result in interesting and unexpected visuals. Processing as a language provides a very simple environment for doing graphics, and thus the programs presented are often a fraction of the size of other languages.

Instead of starting with minimal programs (“hello world”) and asking the reader to write all their own code, basic code is provided, and readers are encouraged to play around and see what they can make happen. Involving the user is an effective method for learning programming. For example, instead of covering the syntax and theory of loops, and then asking someone to write one from scratch, provide a number of examples where loops are used and suggest that the user modify them to see what graphically happens.

The programs provided are short and simple, and generate graphical output that is sometimes striking. This makes playing around with them simple, and provides quick feedback. The programs in the text are all in a downloadable archive that contains over 360 such programs (and more than 16,000 lines of code).

This very strength leads to some serious flaws, however. Reading code is tough work. Even most professionals only read the code that they need to, and print is not the ideal medium for reading code. Most modern programming environments provide syntax highlighting, and many provide very powerful tools to aid in program understanding. When translated, 16,000 lines of code turns into over 300 pages of printed code in the book. I doubt most readers will do more than read a few of these, preferring to interact with the programs through the Processing environment. Worse yet, the printed code contains a multiline comment with a title, author, and dates; while this belongs with the code, it provides little information for the reader of the print version.

Certainly, the printed versions can work for shorter programs, and the book needs those shorter programs to work. However, some of the programs are several pages long (though it is a tribute to the Processing language that few are many pages long); few readers are likely to do more than glance at the page and move on to the next page with text. In the chapter on interactivity, a program is presented, and then code is added (with changes in boldface), and then presented again but without the changes boldfaced. Another complication in the printed code is the introduction of newline indicators. Processing itself does not require these and so it seems odd to include them, especially when the code is indented nicely.

Most readers will prefer the code archive, although even working with the programs in the archive is difficult. The “readme” section says to add these to the Processing environment with copy-and-paste, and therefore all of the images included in data files must also be added to the Processing environment in order to be used. Attempts to open these files (in my Linux copy of Processing) failed; Processing requires files in its own format. The programs are organized by chapter, but the names of the files are (with exactly two exceptions) such unintuitive things as “617xcode0405.txt.” The name “0405” seems to mean that it is the fifth program in the fourth chapter, but the program is not identified as such in the text. Consequently, a person who would like to experiment with a program needs to ferret around in the unpacked archive looking for it.

The code itself is, for the most part, good, but the program as a whole is crying out to have the repetitive code encapsulated as a function. For example, a cube has instance variables of w, h, and d (width, height, and depth, which in a cube are all equal). A default constructor is provided, but there is no initialization for any of these, so that they all get the default value of zero (or for the vertices array that is computed in a constructor that takes specific values for these).

There are a few more problems with the actual printed book. The illustrations are all in monochrome. For example, chapter 10 covers imaging in detail, and several of the programs play with the color values in images. In one such example, the red component of each pixel is changed to 255 if it starts above a threshold value. “Before” and “after” versions of the image are printed, and look almost indistinguishable to my eye (although when running the program the images are clearly different).

Chapter 13, on 3D graphics, makes several mentions of the “next chapter.” There is no next chapter. There is an appendix, but it does not seem to address some of the concerns mentioned (or does so in a way that I could not discover).

Many of these problems could be fixed by removing a good portion of the code from the printed version, and keeping only the smallest samples and code snippets. Other solutions could include some review of the code by a professional programmer, and more careful editing and book design.

Inside this fat, fun, and oh-so-frustrating book, there is a much smaller, more succinct, and more satisfying book waiting to get out. I hope it does someday. If so, it will be a hard book to beat in teaching introductory computing to artists, designers, and programmers.

Reviewer:  Jeffrey Putnam Review #: CR134796 (0808-0759)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Animation (I.3.7 ... )
 
 
Animation (I.6.8 ... )
 
 
Animations (H.5.1 ... )
 
 
Languages (I.3.6 ... )
 
 
Methodology And Techniques (I.3.6 )
 
 
Multimedia Information Systems (H.5.1 )
 
  more  
Would you recommend this review?
yes
no
Other reviews under "Animation": Date
Making them move
Badler N., Barsky B., Zeltzer D., Morgan Kaufmann Publishers Inc., San Francisco, CA, 1991. Type: Book (9781558601062)
Jul 1 1992
Computer animation primer
Fox D., Waite M., McGraw-Hill, Inc., New York, NY, 1984. Type: Book (9789780070217423)
Mar 1 1985
High speed animation and simulation for microcomputers
Adams L., TAB Books, Blue Ridge Summit, PA, 1987. Type: Book (9789780830628599)
Aug 1 1988
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy