|
| 1 | +Processing Book Errata |
| 2 | + |
| 3 | +This is a list compiled for MIT Press to make corrections to future |
| 4 | +printings of Processing: A Programming Handbook for Visual Designers |
| 5 | +and Artists by Casey Reas and Ben Fry. We put tremendous energy into |
| 6 | +producing an error-free book, but we didn't succeed. We're trying to |
| 7 | +remove more with each printing of the book. If you find errors, please |
| 8 | +let us know. (There are instructions at the bottom of this file.) |
| 9 | + |
| 10 | + |
| 11 | +// // // // // // // // // // // // // // // // // // // // // // |
| 12 | + |
| 13 | + |
| 14 | +Compiled 17 October 2007 |
| 15 | + |
| 16 | + |
| 17 | +- p. 6 - Dumb quote |
| 18 | +The word "others's" in the last line on the page: |
| 19 | +- the apostrophe should be a smart quote. |
| 20 | +- should the last "s" be removed (notice the word "students'" above)? |
| 21 | + |
| 22 | + |
| 23 | +- p. 7 - Mispelling |
| 24 | +In the last paragraph, should be "five years since the origin of", not "the origin on" |
| 25 | + |
| 26 | + |
| 27 | +- p. 53 - Error in comment for 5-03. |
| 28 | +The first line of the comment for 5-03 should start, "The test expressions" |
| 29 | + |
| 30 | + |
| 31 | +- p. 100 - CMYK vs. Gray |
| 32 | +The left diagram should be only printed using a screen of K, not all colors. |
| 33 | + |
| 34 | + |
| 35 | +- p. 112 - Incorrect word |
| 36 | +Toward the bottom, "The x and y parameters set the position of the |
| 37 | +upper-left corner.", not the "lower-left corner" |
| 38 | + |
| 39 | + |
| 40 | +- p. 170 - Line wrapping and italic |
| 41 | +In the footnote, wrap "For" to the next line. The last word of the last |
| 42 | +sentence (the fi ligature) should be italic. |
| 43 | + |
| 44 | + |
| 45 | +- p. 207 - Code Error |
| 46 | +In 23-05, the 13th line should be: |
| 47 | +float iy = height - mouseY; // Inverse Y |
| 48 | + |
| 49 | + |
| 50 | +- p. 223 - Extra space |
| 51 | +In the forth line, it looks like there's an extra space here: ", and" |
| 52 | + |
| 53 | + |
| 54 | +- p. 224 - Incorrect comment |
| 55 | +The comment for code 25-01 should read, "// Draw a line while any key is |
| 56 | +pressed" |
| 57 | + |
| 58 | + |
| 59 | +- p. 231 - Typo |
| 60 | +'and the white circle follows the mouse' should be 'and the black circle |
| 61 | +follows the mouse' |
| 62 | + |
| 63 | + |
| 64 | +- p. 397 - Diagrams missing type, rasterized type |
| 65 | +Both diagrams on the page rendered incorrectly. The top one is missing the |
| 66 | +type for the Apple Class. The type in the bottom diagram is rastered, not |
| 67 | +vector as it should be. |
| 68 | + |
| 69 | + |
| 70 | +- p. 451 - draw() not all bold |
| 71 | +In code 41-16, the draw() should be entirely bold, the "d" is currently not. |
| 72 | + |
| 73 | + |
| 74 | +- p. 528 - Type cut off in top figure |
| 75 | +The type in the top figure is truncated, the crop box need to be pulled |
| 76 | +down. The "y" in y-axis is missing the descender. |
| 77 | + |
| 78 | + |
| 79 | +- p. 536 - Code to Mono |
| 80 | +In Example 7, the specular() function name should be in the mono font. |
| 81 | + |
| 82 | + |
| 83 | +- p. 656 - Figures |
| 84 | +The figures didn't seem to output correctly. Look at the center of the |
| 85 | +servo, the type in the chip, and the dc motor. |
| 86 | + |
| 87 | + |
| 88 | +// // // // // // // // // // // // // // // // // // // // // // |
| 89 | + |
| 90 | + |
| 91 | +Compiled 8 November 2007 |
| 92 | + |
| 93 | + |
| 94 | +- p. 707 |
| 95 | +Lieberman, Zachary listed as "512-512" when should be "511-512" |
| 96 | + |
| 97 | + |
| 98 | +- p. 710 |
| 99 | +Tarbell, Jared listed as "155-156" when should be "154-159" |
| 100 | + |
| 101 | + |
| 102 | +- p. 81 - Description of map() |
| 103 | +"Similar to the norm function, the low1 and low2 ..." Should be: |
| 104 | +"Similar to the norm function, the low1 and high1 ...." |
| 105 | + |
| 106 | + |
| 107 | +// // // // // // // // // // // // // // // // // // // // // // |
| 108 | + |
| 109 | + |
| 110 | +Compiled 26 March 2008 |
| 111 | + |
| 112 | + |
| 113 | +- p. 118 |
| 114 | +angles in math are positive counterclockwise and negative clockwise. The |
| 115 | +sine of an angle of PI/2 is +1, of 3*PI/2 is -1. In the book (see picture) |
| 116 | +the sine of PI/2 is -1 (wrong!) and of 3*PI/2 is +1 (wrong!). These |
| 117 | +mistakes are made in all trigonometrical views dealing with sine and |
| 118 | +cosine. Please check all trigonometric functions in the book. |
| 119 | +The calulations of sine and cosine in processing are correct, the mistakes |
| 120 | +are only in the book. |
| 121 | + |
| 122 | + |
| 123 | +- p. 105 |
| 124 | +"I noticed on Page 105 under syntax introduced: that string.startsWidth and |
| 125 | +string.endsWidth should be updated to be String.startsWith and |
| 126 | +String.endsWith. |
| 127 | + |
| 128 | +- http://dev.processing.org/bugs/show_bug.cgi?id=741 |
| 129 | + |
| 130 | + |
| 131 | +// // // // // // // // // // // // // // // // // // // // // // |
| 132 | + |
| 133 | + |
| 134 | +Compiled 2 April 2008 |
| 135 | + |
| 136 | + |
| 137 | +- p. 105 |
| 138 | +Under syntax introduced: string.startsWidth and string.endsWidth should be |
| 139 | +updated to be String.startsWith and String.endsWith |
| 140 | + |
| 141 | + |
| 142 | +- p. 118 |
| 143 | +The diagram needs to be replaced with the attached diagram. "14-Math-3-SineGrid-update.ai" |
| 144 | +The diagram is flipped over the y-axis. |
| 145 | + |
| 146 | + |
| 147 | +- p. 309 |
| 148 | + |
| 149 | +Example 33-17 |
| 150 | + |
| 151 | +String[] trees = { "ash", "oak" }; |
| 152 | +append(trees, "maple"); // INCORRECT! Does not change the array |
| 153 | +println(trees); // Prints [0] "ash", [1] "oak" |
| 154 | +println(); |
| 155 | +trees = append(trees, "maple"); // Add "maple" to the end |
| 156 | +println(trees); // Prints [0] "ash", [1] "oak", [2] "maple" |
| 157 | +println(); |
| 158 | +// Add "beech" to the end of the trees array, and creates a new |
| 159 | +// array to store the change |
| 160 | +String[] moretrees = append(trees, "beech"); |
| 161 | +// Prints [0] "ash", [1] "oak", [2] "maple", [3] "beech" |
| 162 | +println(moretrees); |
| 163 | + |
| 164 | + |
| 165 | +Example 33-18 |
| 166 | + |
| 167 | +String[] trees = { "lychee", "coconut", "fig"}; |
| 168 | +trees = shorten(trees); // Remove the last element from the array |
| 169 | +println(trees); // Prints [0] "lychee", [1] "coconut" |
| 170 | +println(); |
| 171 | +trees = shorten(trees); // Remove the last element from the array |
| 172 | +println(trees); // Prints [0] "lychee" |
| 173 | + |
| 174 | + |
| 175 | +- p. 310 |
| 176 | + |
| 177 | +Example 33-20 |
| 178 | + |
| 179 | +String[] north = { "OH", "IN", "MI" }; |
| 180 | +String[] south = { "GA", "FL", "NC" }; |
| 181 | +arraycopy(north, south); // Copy from north array to south array |
| 182 | +println(south); // Prints [0] "OH", [1] "IN", [3] "MI" |
| 183 | +println(); |
| 184 | +String[] east = { "MA", "NY", "RI" }; |
| 185 | +String[] west = new String[east.length]; // Create a new array |
| 186 | +arraycopy(east, west); // Copy from east array to west array |
| 187 | +println(west); // Prints [0] "MA", [1] "NY", [2] "RI" |
| 188 | + |
| 189 | + |
| 190 | +// // // // // // // // // // // // // // // // // // // // // // |
| 191 | + |
| 192 | + |
| 193 | +Compiled 28 August 2008 |
| 194 | + |
| 195 | + |
| 196 | +x p. 81 |
| 197 | +On the fifth line from the bottom of p. 81, the word "number's" needs an |
| 198 | +apostrophe to replace the foot mark before the 's'. |
| 199 | + |
| 200 | + |
| 201 | +x p. 203 |
| 202 | +In code 22-10, the 13th line should read: |
| 203 | + drawCircle(63, 85, n); |
| 204 | + |
| 205 | + |
| 206 | +- p. 309 |
| 207 | + |
| 208 | +Example 33-17 and 33-18 were not typeset correctly when they were fixed in |
| 209 | +the last round of corrections. Please follow the exact line breaks below: |
| 210 | + |
| 211 | +Example 33-17: |
| 212 | + |
| 213 | +String[] trees = { "ash", "oak" }; |
| 214 | +append(trees, "maple"); // INCORRECT! Does not change the array |
| 215 | +println(trees); // Prints [0] "ash", [1] "oak" |
| 216 | +println(); |
| 217 | +trees = append(trees, "maple"); // Add "maple" to the end |
| 218 | +println(trees); // Prints [0] "ash", [1] "oak", [2] "maple" |
| 219 | +println(); |
| 220 | +// Add "beech" to the end of the trees array, and creates a new |
| 221 | +// array to store the change |
| 222 | +String[] moretrees = append(trees, "beech"); |
| 223 | +// Prints [0] "ash", [1] "oak", [2] "maple", [3] "beech" |
| 224 | +println(moretrees); |
| 225 | + |
| 226 | + |
| 227 | +Example 33-18: |
| 228 | + |
| 229 | +String[] trees = { "lychee", "coconut", "fig"}; |
| 230 | +trees = shorten(trees); // Remove the last element from the array |
| 231 | +println(trees); // Prints [0] "lychee", [1] "coconut" |
| 232 | +println(); |
| 233 | +trees = shorten(trees); // Remove the last element from the array |
| 234 | +println(trees); // Prints [0] "lychee" |
| 235 | + |
| 236 | + |
| 237 | +x p. 322 |
| 238 | +Code 35-03 uses the set() syntax, which has not yet been introduced. |
| 239 | +Instead, use image(img, x, y) in place of the set() function on lines 5, 6: |
| 240 | +replace "set(18, 0, slice)" with "image(slice, 18, 0);" |
| 241 | +replace "set(50, 0, slice)" with "image(slice, 50, 0);" |
| 242 | + |
| 243 | + |
| 244 | +- p. 397 |
| 245 | +Gray type in the Apple class box is too light. |
| 246 | + |
| 247 | + |
| 248 | +x p. 536 |
| 249 | +In Example 7, there's a needless line break after "relation" in Example 7. |
| 250 | +This needs to be carefully fixed. It moves up the text one line, so please |
| 251 | +be careful that the figure on page 537 still relates to the text line above. |
| 252 | +Make sure the top line of text from page 538 doesn't wrap onto 537. |
| 253 | + |
| 254 | + |
| 255 | +// // // // // // // // // // // // // // // // // // // // // // |
| 256 | + |
| 257 | + |
| 258 | +Compiled 22 April 2010 |
| 259 | + |
| 260 | +x p. 459 |
| 261 | +Code 48-10 has an error on line 15 (this is the 7th line on page 459.) |
| 262 | +The line should read: |
| 263 | + if (pressed == true) { |
| 264 | + |
| 265 | +Because "pressed" is the name of the boolean field in the super-class |
| 266 | +on page 439 that this class extension refers to. |
| 267 | + |
| 268 | +x p. 459 |
| 269 | +Code 48-09 has an error on line 16. The line should read: |
| 270 | + icon.update(); |
| 271 | + |
| 272 | +Because the update() method in the super-class |
| 273 | +on page 439 takes no parameters. |
| 274 | + |
| 275 | + |
| 276 | +x p. 460 |
| 277 | +Code 48-10 has an error on line 11. The line should read: |
| 278 | + if (pressed == true) { |
| 279 | + |
| 280 | +Because "pressed" is the name of the boolean field in the super-class |
| 281 | +on page 439 that this class extension refers to. |
| 282 | + |
| 283 | +Back cover: |
| 284 | +In Casey's bio line, "an associate professor" should be "a professor" |
| 285 | +and "Design | Media Arts" should be "Design Media Arts" |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | +// // // // // // // // // // // // // // // // // // // // // // |
| 290 | + |
| 291 | +// // // // // // // // // // // // // // // // // // // // // // |
| 292 | + |
| 293 | + |
| 294 | +If you find a bug (error) in Processing: A Programming Handbook for Visual |
| 295 | +Designers and Artists by Casey Reas and Ben Fry, please let us know so we |
| 296 | +can fix it! We worked extremely hard to get rid of them, but we know |
| 297 | +they are there. |
| 298 | + |
| 299 | +Please report all bugs to the Issues database: |
| 300 | +https://github.com/processing/processing/issues?state=open |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
| 306 | + |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | + |
| 311 | + |
| 312 | + |
| 313 | + |
| 314 | + |
| 315 | + |
| 316 | + |
| 317 | + |
| 318 | + |
| 319 | + |
| 320 | + |
| 321 | + |
| 322 | + |
0 commit comments