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.0,
released over 3 years 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.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| 10 |
|
#29860: "And do the CMPND and AUTHOR lines.."
CMPND should be COMPND--Cristian Vat
|
P1.0
09-Nov-07
|
|
|
23 |
#23997: Page 23
Near the middle it says:
... keys didn't actually have to be unique within sections.
Should be:
... keys only have to be unique within each section.
And also remove "WindowSize=1280,1024" in the [View]listing that follows this paragraph--Maria Rutgers #23997: Page 23
Near the middle it says:
... keys didn't actually have to be unique within sections.
Should be:
... keys only have to be unique wi ...more...
|
P1.0
29-Jan-06
|
|
|
35 |
#23998: Near the bottom it says:
It will read from all the files the user specifies (...), unless the -o argument is used, ...
Should be:
It will read from all the files the user specifies (...) and write to stdout, unless the -o argument is used, ...
--Maria Rutgers #23998: Near the bottom it says:
It will read from all the files the user specifies (...), unless the -o argument is used, ...
Should be:
It wil ...more...
|
P1.0
29-Jan-06
|
|
|
49 |
#23190: The listing of the Regular Expressions search pattern contains an error - at least according to running the program on page 48 in python22 on windows. Here are my results:
'' a b Xab aXb abX ab aXXXb a.b
'' + + + + + + + + +
a - + - + + + + + +
a.b - - - - + - - - +
a?b - - + + + + + + +
a*b - - + + + + + + +
a+b - - - + - + + - -
a\.b - - - - - - - - +
a\+b - - - - - - - - -
.*ab - - - + - + + - -
The error is that obviously "a?b" matches "aXb" when searching, as it should match the same as "b" or "ab".
The error propagates down page 49 in the 3rd paragraph. The last sentence reads: "or aXb (the a and the b aren't adjacent)." Well, they're not and they don't have to be.
The following paragraph on the other hand is perfect even though the description clashes with the faulty table and the description just provided.
--Per Holst #23190: The listing of the Regular Expressions search pattern contains an error - at least according to running the program on page 48 in python22 on ...more...
|
P1.0
20-Aug-05
|
|
|
53-59 |
#23457: To the best of my knowledge, the domain component of an email address has to contain two segments, e.g. a@b.c is OK but a@b isn't. Your RE matches a@b.
If I'm right, the correct RE is more like:
([\w.-]+@([\w-]+\.)+[\w-]+)(.*)
(That includes your group 3 for matching the rest of the line.)
Great book!--Dan Cooperstock #23457: To the best of my knowledge, the domain component of an email address has to contain two segments, e.g. a@b.c is OK but a@b isn't. Your RE mat ...more...
|
P1.0
24-Oct-05
|
|
|
54 |
#22791: The horizontal bracket showing the extent of group 1 is too wide: it should not include the final "(.*)" of the regular expression.--Matthew Wilson
|
P1.0
14-Jun-05
|
|
|
54 |
#22792: The horizontal bracket showing the extent of group 2 is too wide: it should not include the trailing "*)", which is actually the end of group 1.--Matthew Wilson
|
P1.0
14-Jun-05
|
|
|
66 |
#22793: "if val > 127" in code fragment should be "if val > 255"--Mathias Meyer
|
P1.0
14-Jun-05
|
|
|
67-68 |
#22794: The last "\d{3}" in each RE should be "\d{4}" (to capture the last four digits in each phone number).--Matthew Wilson
|
P1.0
14-Jun-05
|
|
|
67 |
#23202: 2nd paragraph end with:
"And once again, the only way to solve the problem is case by case (Figure 3.3)."
There are other options, e.g. the pattern "<[^>]*>" which matches anything enclosed in <>-brackets, that is: start, end, and selfclosing tags.
Ok, this solution does not use as much reg.exp. as figure 3.3, but whenever there are multiple solutions neither of these can be considered "the only one".
--Per Holst #23202: 2nd paragraph end with:
"And once again, the only way to solve the problem is case by case (Figure 3.3)."
There are other options, e.g. th ...more...
|
P1.0
21-Aug-05
|
|
|
70 |
#23201: First paragraph reads:
"Bytes in the range 0-255 (hex 0000-007f)"
Should read:
"Bytes in the range 0-127 (hex 0000-007f)"
--Per Holst
|
P1.0
21-Aug-05
|
|
|
81 |
#23238: In "Joe Asks..." you mix up the counting in the last paragraph. Your writing "The third is mostly.." probably meant "The fourth is mostly..". An explanation for the third bullet would be nice too.--funkattack #23238: In "Joe Asks..." you mix up the counting in the last paragraph. Your writing "The third is mostly.." probably meant "The fourth is mostly..". ...more...
|
P1.0
09-Sep-05
|
|
|
104 |
#25582: In the first paragraph that starts on the page, "/project/*/author" will match only authors of tickets. It will NOT match authors of comments. To match authors of comments, "/project/*/*/author" works. To match authors of both tickets and comments, use "/project//author."--Andy Fox #25582: In the first paragraph that starts on the page, "/project/*/author" will match only authors of tickets. It will NOT match authors of comments ...more...
|
P1.0
28-Jul-06
|
|
|
125 |
#23217: In the "Joe Asks" block it says:
"15 (base 10) (negative acknowledge)"
Which should be:
"15 (base 16) (negative acknowledge)"
--Per Holst
|
P1.0
25-Aug-05
|
|
|
125 |
#23218: Near the bottom it says:
"32-bit integer 1027(base 10) (which is 0x0407 (base 16))"
Should be:
"32-bit integer 1031(base 10) (which is 0x0407 (base 16))"
--Per Holst #23218: Near the bottom it says:
"32-bit integer 1027(base 10) (which is 0x0407 (base 16))"
Should be:
"32-bit integer 1031(base 10) (which is 0x ...more...
|
P1.0
25-Aug-05
|
|
|
128-129 |
#22867: The methods for storing integers as binary data are namend packVec() and unpackVec(), but the text relates to them as packIntVec() and unpackIntVec() respectively.--Mathias Meyer #22867: The methods for storing integers as binary data are namend packVec() and unpackVec(), but the text relates to them as packIntVec() and unpackI ...more...
|
P1.0
18-Jun-05
|
|
|
132 |
#22795: All implementations of Java in widespread use today will optimize repeated string concatenation, so that "abc"+"def"+"ghi" doesn't allocate an unnecessary intermediate buffer.--Matthew Wilson #22795: All implementations of Java in widespread use today will optimize repeated string concatenation, so that "abc"+"def"+"ghi" doesn't allocate an ...more...
|
P1.0
14-Jun-05
|
|
|
139 |
#23489: You have included a CustId column in the Assigned table. I don't think it is ever used from there, and it really shouldn't be there because it is not normalized - you can get it from the Project table, based on the Projid.
Also, this is very minor but your capitalization of Id fields is inconsistent. In a couple of places on that page CustId has the "I" capitalized, and in others it isn't. In Empid and Projid the "i" is never capitalized.--Dan Cooperstock #23489: You have included a CustId column in the Assigned table. I don't think it is ever used from there, and it really shouldn't be there because it ...more...
|
P1.0
27-Oct-05
|
|
|
150 |
#23221: The query "Find people in 904 or 905, but not both." is incorrect.
SELECT Person.FirstName, Person.LastName
FROM Person, Assigned
WHERE (Person.EmpId = Assigned.EmpId)
AND ((Assigned.ProjId = 904) OR (Assigned.ProjId = 905))
AND (Assigned.ProjId NOT IN
(SELECT A.ProjId
FROM Assigned A, Assigned B
WHERE (A.ProjId = 904) AND (B.ProjId = 905)));
is a clumsy way of saying: "People not assigned to project 904"
And the result is not the same as "Select people who are assigned to exactly one project" - which it should be, as stated in the text.
The correct query is:
-- Find people in 904 or 905, but not both.
SELECT Person.FirstName, Person.LastName
FROM Person, Assigned
WHERE (Person.EmpId = Assigned.EmpId)
AND ((Assigned.ProjId = 904) OR (Assigned.ProjId = 905))
AND (Person.EmpId NOT IN
(SELECT A.EmpId
FROM Assigned AS A, Assigned AS B
WHERE (A.ProjId = 904) AND (B.ProjId = 905) AND A.EmpId = B.EmpId));
The result is:
Dave|Thomas
Andy|Hunt
Grace|Hopper
Chuck|Babbage
which, of course, is not the result stated in the book.
--Per Holst #23221: The query "Find people in 904 or 905, but not both." is incorrect.
SELECT Person.FirstName, Person.LastName
FROM Person, Assigned
WHERE ...more...
|
P1.0
26-Aug-05
|
|
|
154 |
#23490: According to SQL standards, as I understand them, the statement near the bottom of the page that the condition CustId <> 1027 will match rows where CustId is NULL is wrong. Thus, the alternate query at the bottom of the page is not required. NULL does not compare to any value, using any comparison operator. Thus, NULL = 0, NULL <> 0, NULL < 0, and NULL > 0 all evaluate to false.--Dan Cooperstock #23490: According to SQL standards, as I understand them, the statement near the bottom of the page that the condition CustId <> 1027 will match rows ...more...
|
P1.0
27-Oct-05
|
|
|
156 |
#22866: The description for the SQL type DECIMAL should be "...one that has a fixed number of digits..."--Mathias Meyer
|
P1.0
18-Jun-05
|
|
|
166 |
#22868: The first paragraph of section 6.6 should end with "...who didn't understand that data is for grepping".--Mathias Meyer
|
P1.0
18-Jun-05
|
|
|
178 |
#27367: Base-64 Encoding
The order of the characters for base64 is not arbitrary. The author wonders, why the list of characters doesn't start with digits 0-9. This is because it is not really a number system like binary, decimal or hexa-decimal system, but simply the 6-bit value added to the ASCII-value of the letter 'A'. So the "encoding characters" are exactly used as ni the ASCII standard.
A simply base-64 conversion would be
int _6bitval = ---
char base64Val = 'A' + _6bitval;
This leads to all characters being printable in the 7-bit ASCII-encoding.--Wolfgang Schell #27367: Base-64 Encoding
The order of the characters for base64 is not arbitrary. The author wonders, why the list of characters doesn't start with ...more...
|
P1.0
07-Mar-07
|
|