By Developers, For Developers
| PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
|---|---|---|---|---|---|
| 31,32 | ERROR | all source codes with echo commands and \ | 2015-05-24 | ||
| iii | OK | Please, if possible, include a chapter on how to extract data from PDF files. | 2015-06-28 | Hi Arnaldo, \n \nI had always intended to include a chapter on reading from PDFs, but in the end it seemed like there wasn't something useful to say about it. I can't talk about parsing the PDF format itself, since that wouldn't be practical and would take a whole book; but if I talk about using a library, that's not particularly interesting to the reader. In the end, I couldn't figure out a way to do it that justified its inclusion. \n \nBest, \nRob | |
| 8 | TYPO | “… each_line will result in a noticeably more solution.” This phrase is missing a word. | 2015-05-24 | ||
| 78 | TYPO | “Allows you to hone in on” - should be HOME in on | 2015-06-23 | ||
| 24 | TYPO | There should not be a trailing forward slash after (first line of output in the first example under the heading “Running the Script”) | 2015-06-28 | ||
| 26 | TYPO | Spelling mistake in p.26 paragraph 2 “… searchs the filesystem…” : “searchs” should be “searches” | 2015-06-28 | ||
| 32 | SUGGEST | When I run the first example on page 32 I don’t get precisely the same output. Running zsh I get a trailing ‘%’ character after ‘bar’, indicating the text ended without a newline character, and running bash the command prompt starts immediately after the output (the ‘bar’ in this case). My suggestion is that for this example and similar ones you might consider adding a newline character to the end of the input i.e. ‘foo\ | 2015-06-28 | ||
| 144 | TYPO | Misspelling of matches | 2015-08-20 | Sorry, I may be being completely blind but I don't see this. Could you give me some context for where the typo is? No worries if not — it should be caught in the copy-editing stage! | |
| 5 | TYPO | This sentence seems awkward and considering you have not mentioned a Log file before this line, it seems a bit off. “One example of this sort of log file that you might have encountered before is from the popular web server Apache.” | 2015-09-04 | ||
| 13 | SUGGEST | Maybe put an inline reference to an URL where one can get this data? “The National Oceanic and Atmospheric Administration releases data ” | |||
| 105 | TYPO | In the subsection “String-specific encodings” there’s an extra ‘the’ which should be removed. The sentence reads as follows: The result is a string encoded as ASCII that has had “the” any characters that are invalid ASCII stripped from it. That “the” can be removed. | 2015-09-04 | ||
| 105 | TYPO | Duplicated verb: If we know that the string we have is is in a specific format, | 2015-09-04 | ||
| 110 | TYPO | on section Detecting Encodings, a method is referred by the wrong name. The paragraph in question reads like so: If we want to both detect the encoding and also change Ruby’s internal encoding of the string - […] we can do so with the detect_encoding method. however that method is called detect_encoding! as can be seen on the follow-up example. | 2015-09-04 | As discussed on the forum — both methods exist and do different things. | |
| 68 | SUGGEST | The one-liner for finding all home directories of all users can be slightly simplified. It currently reads as: $ ruby -F: -ane ‘puts File.expand_path(“~” + $F[0]) unless /^#/’ /etc/passwd However, the home directory is listed in passwd itself at the 5th position (6th if you’re counting starting at 1). That means the one-liner: $ ruby -F: -ane ‘puts $F[5] unless /^#/’ /etc/passwd is slightly shorter and equivalent, at least for systems which provide /etc/passwd with all fields. I did notice that the example User Database doesn’t show home directories, though. | 2015-09-04 | My system does show home directories, and others might too, but in this case I wanted to show an example of doing some further processing with Ruby; it might be somewhat contrived as a result, but the important bit is seeing the use of Ruby to work with the data, I think. | |
| 36 | SUGGEST | the code from section “The Logic” can be slightly improved if we use join, instead of iterating over each url. Like below: #!/usr/bin/env ruby $stdin.each_line do |line| Wondering if I’m missing something as to why it couldn’t be done like above. | 2015-09-04 | ||
| 36 | SUGGEST | $ cat foo | bar can be written as: $ bar < foo | 2015-09-04 | I'm quite a strong believe in the supposedly unnecessary use of cat, since it preserves the left-to-right order of the pipeline that — especially for beginners — makes it much easier to read and understand. | |
| 238 | TYPO | If you want to pipe the contents of a file, you have two options. The first is to user@computer:~ $ cat Documents/birthday-list.txt | grep Ruby user@computer:~ $ grep Ruby < Documents/birthday-list.txt | |||
| 20 | SUGGEST | When having process ids with different digit numbers (ie 3003 and 12755), then using the cut with the space delimiter will not display the smaller number so by using the following: we will get the following output: when using a different command like awk: 3003 | |||
| 7 | ERROR | In Chapter 3 on the bottom page 7 (Streaming Lines with the -n Switch) of the free excerpt the text after the code snippet " $ printf “foo\ | |||
| 31 | ERROR | There seems to be some HTML mark up left at the bottom of the page (below the FOO/BAR) $ printf “foo\
There’s more to | |||
| 134 | TYPO | In chapter 5 (delimited data) there are a couple of places where you refer to $; as a record separator and others as a field separator - also there are a few places where you say “record separator” when I think you mean “field separator” | |||
| 60 | 47 | TYPO | Second line of “Deleting Elements” section has “… is to to allow …”. One to too many | ||
| 99 | ERROR | In paragraph 2, ‘detect_encoding’ should be ‘detect_encoding!’ (i.e. with a ‘!’ suffix). | |||
| 162 | ERROR | In nlp/simple-search.rb: the return value of ‘articles.select’ should be assigned to the variable ‘matches’, not ‘articles’. | |||
| 225 | ERROR | In erb/purchase-ledger-decorators.erb: ‘Currency’ doesn’t match the class name defined in purchase-ledger-decorators.rb, which is ‘Dollars’. [In the source code download, there’s an additional instance of this in the computation of ‘Total’, and there are two spurious ‘<%’ lines.] | |||
| 85 | ERROR | The code example for LeagueTable#initialize is incorrect, as url as passed in as a method argument, but the first line uses | |||
| 138 | ERROR | The text and code are out of sync and in conflict. - The text is talking about specifying the assignment token, but the code snippet starts with defining newline tokens, using “alternation” which isn’t discussed until pg 146… “In the delimiter definition, we’re introduced to another new concept: alternation…” The text on pg. 138 talks about the snippet as if this line doesn’t exist. - The method `.absent?` is introduced without talking about it until page 146 in a different code snippet, which explicitly states “The .absent? method is something we haven’t seen before.” - Further down the text refers to code that doesn’t exist: | |||
| 13 | 13 | ERROR | The book incorrectly specifies that: “The first column, containing the date of the week in There first column containing the date is actually just 10 characters long. This is also evident from the code sample “noaa-first- row-simple.rb”. The line “file.read(10)” only reads 10 bytes - not 12 as suggested. | ||
| 29 | TYPO | Third paragraph, last sentence reads: “At times like these, it would nice if we could introduce Ruby …” I think it was meant to say, “At times like these, it would be nice …” | |||
| 37 | SUGGEST | The return value is not given for the command to return the longest line from ` a\ I’m thinking it should be `bb`, but when I ran the command, it returned `a`. My suggestion is to include the return value on the next print of the book, or append some `chomp`s on `$_` so that the expected `bb` is returned | |||
| 14 | ERROR | In the “noaa-all-rows.rb”, to skip to the next line, you must file.read(2) instead of 1. | |||
| 16 | ERROR | Seeking through the file. Must read 64 characters to skip a whole line. | |||
| 17 | ERROR | In “noaa-seek.rb” / “get_week” block. to skip lines must multiply by 64 instead of 63. |