The Pragmatic Programmer, 20th Anniversary Edition errata

Some minor things in the paper edition that says “3 2020” on the title page verso, not mentioned in the book’s errata online:

p. 186 But Erlang (and it’s progeny … should be: its

p. 205 chart O(n ln n) should be: O(n lg n)

p. 221 Ad Hoc Testing “run poke at our code manually”: I’m not sure exactly what is meant here. Maybe leave out “run”: poke at our code manually

p. 222 “Ignore a spew … makes it easier to ignore all the tests”: not sure what this means. “Ignore a spew”?

p. 226 “raise Exception”: needs to be indented two more spaces (significant in Python)

3 Likes

Hello!!!

I also notice on the possible answer for the exercise 8 (page 297, solution in ruby of the time parser) the regular expression for the tenths of minutes includes 6, so hours like 6:66 pm are valid.

1 Like

Hi,
I also noticed the following (book with ISBN-13: 978-0-13-595705-9):

  • page 140, in the code for strings_fsm.rb, for the state in_string, I think the matching character should be a single backslash instead of two.
  • page 160, “When the top level calls my_car.move_at(30) , the method …”, the object name (my_car) does not align with the top-level code example (my_ride). I think one of the two should be changed so they align.
  • page 196, “But it applies to the bigger picture are well”, I think instead of “are” there should be “as”.
1 Like

p. 120 - in the second code snippet there seems to be one missing statement:
write_customer between the following two lines:

@balance = @balance.add(transaction_amount, 2)        #    |
# --> here, I think, write_customer call is missing
file.close                                            #  <--
2 Likes

In the Italian edition the error is at page 97 not 120.

1 Like

page 125: “Don’t Outrun Your Headlights”

A hairpin comes up and the car misses it, crashing though the skimpy guardrail…"

s/though/through/

At the top of p. 222, they say:

“Poorly or inconsistently formatted diagnostics are just so much “spew”—they are difficult to read and impractical to parse.”

Maybe that helps?

@jon - Re: “run poke”, I googled the phrase followed by the word “code” and found these references.

Maybe this helps?

@pragdave

In the solution for Exercise 6 at pag 295 (Answer 6)

Using BNF a time spec… could be

h-tens ::= 0|1|2 ( I think 2 shall be added here as I can have 20:30 or also 21:30 …)

1 Like