David Kettle (13) [Avatar] Offline
Is there an official errata page for this book? Or is the forum all there is? I have a minor issue. In Listing 8.3, there's a parameter to the constructor, 'ind', which is saved in the instance variable 'index', but never used. Of course this doesn't cause any problem, but might be confusing to novices. If a second edition of this book is ever published (I hope so, it's a great book), maybe this could be cleaned up.

Other suggestions for a future edition:

1. I realize that the book is written for artists without any programming background, so some more technical topics are avoided. But maybe some explanation of scoping rules would be helpful. For example, in many of the constructors, the parameters are given different names from the instance variables (like 'ex' for 'x' and 'why' for 'y'). This really isn't necessary, you can write something like this instead:

Branch (float level, float x, float y) { 
    this.level = level;
    this.x = x;
    this.y = y;

This would require some explanation of scoping rules, the qualifier 'this' and masking of names, but I think it makes the code more understandable.

2. Update the book to reflect changes in the language since the book was first written. I think some of the problems reported in this forum are due to minor changes in the language.

3. Early in the book, the author recommends using the built-in variables 'width' and 'height' rather than hard-coding numbers. But in a number of examples, he ignores his own advice and has hard-coded numbers for width and height. For example, in listing 7.5, there's the following line in the class constructor:

    nextState  ((x/500) + (y/300)) * 14;

I'm assuming that 500 and 300 were chosen because the size for the sketch was set to 500 X 300, but it isn't obvious. Things like this could be cleaned up too.

I hope I don't sound too negative. I've read a few books on Processing, and I'd still recommend this one as the best introduction for people without any programming background.