Errata for Learn to Program, 2nd Edition
We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.
The latest version of the book is P1.1, released 10 months ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.
| Paper | Description | Found in | Fixed in | |
|---|---|---|---|---|
| 6 |
#38254: ruby version numbers in the middle of page (after ruby -v) does not match up. i.e. 1.8.6, then 1.8.1 and then 1.8.3--Llewellyn Janse van Rensburg |
B1.0
08-Mar-09 |
||
| 12 |
#39083: puts 5 * (12-8) + -15
puts 98 + (59872 / (13*8)) * -51
is the second closing parenthesis after 13*8 incorrect? does not seem to work unl...more...
|
P1.1
04-May-09 |
||
| 15 |
#41581: I'll color strings 'blue'. should be: I'll color strings 'magenta'.--M.Roxas |
P1.0
20-Nov-09 |
||
| 17 |
#40562: Hello,
It's called "escaping" because, in the old days, it caused the compiler to escape from the normal processing of characters. which wa...more...
|
P1.1
24-Aug-09 |
||
| 26 |
#38596: section 5.3 output of "puts gets" is wrong:
|
P1.0
28-Mar-09 |
||
| 27 |
#38597: Error in program output:
|
P1.0
28-Mar-09 |
||
| 27 |
#38622: It looks like the example output of the same code are not being produced correctly - I'm seeing ruby interpreter errors instead of the expecte...more...
|
P1.0
29-Mar-09 |
||
| 30 |
#37890: The book asks to list which methods were learned in chapters 1-5 as:
puts
gets
chomp
conversions (.to_s, .to_i, .to_f)
arithmetic (+,-,*,...more...
|
B1.0
23-Feb-09 |
||
| 31 |
#37891: Regarding the first examples starting with:
puts 5.+ 5
puts('hello '.+ 'world')
puts((10.* 9).+ 9)
Can you please clarify why simply rem...more...
|
B1.0
23-Feb-09 |
||
| 35 |
#38261: Second last sentence on page 35 should read: “They are similar to center, except that they pad the string with spaces on the right and left si...more...
|
B1.0
08-Mar-09 |
||
| 44-52 |
#38621: The whole range of pages 44 through 52 has incorrect code output boxes showing "#<NoMethodError: private method ‘gets' called for false:FalseClass"--Ismar |
P1.0
29-Mar-09 |
||
| 50 |
#41300: What, are you like... by little brother?! should be: What, are you like... my little brother?! |
P1.1
10-Nov-09 |
||
| 50 |
#38773: output does not match program--paul spain |
P1.1
06-Apr-09 |
||
| 51 |
#38774: output at top of page 51 does not match program on page 50--paul spain |
P1.1
06-Apr-09 |
||
| 84 |
#41081: Exercize 9.5 intructs the reader to get rid of the 'answer' variable, however, both solutions on pgs 172, 173 still return this variable.--Cosmo Lee |
P1.0
25-Oct-09 |
||
| 86 |
#37861: I have correctly entered this program as instructed and I can't get the question to recur either in Terminal or in TextMate. I am using a Mac,...more...
|
B1.0
21-Feb-09 |
||
| 88 |
#38665: Setting aside the fact that the recursion chapter melted my brain, there were two things unexplained by the author in the continent_size examp...more...
|
P1.1
01-Apr-09 |
||
| 90 |
#41082: For those readers unfamilar with the world of computer games, the references and exercizes related to the game "Civilization III" are annoying...more...
|
P1.0
25-Oct-09 |
||
| 109 |
#38664: Hi,
I'm a newbie, so I could be wrong about this, but I found what I think is an error on page 113 in the example about moving files using ...more...
|
P1.1
01-Apr-09 |
||
| 112 |
#41084: I don't know if it's a typo or a font issue, but at various places the square brackets look instead like parentheses (sp?)...--Cosmo Lee |
P1.0
25-Oct-09 |
||
| 119 |
#39710: The body text, and the example code, say that prof[12,8] and prof[12..20] are the same, but unfortunately that isn't correct. This can be pro...more...
|
P1.1
27-Jun-09 |
||
| 119 |
#41930: It would be nice to add just one more version of this example with
if name[0] == ?C
changed to
if name[0,1] == C
in order to illustrate th...more...
|
P1.1
27-Dec-09 |
||
| 127 |
#39716: In the second paragraph of section 13.4, the word "keep" is incorrectly shown twice. It says "keep keep" and should just say "keep".--Dan Laffan |
P1.1
28-Jun-09 |
||
| 172 |
#39921: The final example on this page doesn't run, and in fact the output listed in the PDF is an error message.
#<TypeError: wrong argument type ...more...
|
P1.1
10-Jul-09 |
||
| 179 |
#38003: I cannot get the shuffle program "How I would do it" to run under Ruby 1.8.6 Leopard OS X. Error Message: wrong argument type Symbol (expected...more...
|
B1.0
26-Feb-09 |
||
| 181 |
#38428: The "How I would do it" program is wrong. It should be:
def dictionary_sort arr
return arr if arr.length <= 1
middle = arr.pop
...more...
|
B1.0
20-Mar-09 |
||
| 197 |
#38962: The 'How I would do it' roman_to_integer program needs the following line at the beginning of the program: require 'jcode'
|
P1.0
22-Apr-09 |
