Tell me my typos

I just got some good news from the publisher:

I’m writing to inform you that Apress is preparing to reprint your book, DOM Scripting: Web Design with JavaScript and the Document Object Model. Congratulations!

That’s good. Hopefully the reprints won’t feature the limited edition copies with pages upside-down (very embarrassing, let me tell you).

But there’s more:

I wanted to ask you whether you’ve received any errata for the book that you would like to be corrected in the reprint.

Actually, I had already been giving this some thought when I got the email. I’ve been meaning to put together a simple little form to allow anyone to report errors and typos and which page they’re on. But it doesn’t like I’m going to have time to get it together: I need to get the errata list together before Monday, November 1st.

Now, I’ve already found one or two in the sample chapter, chapter 5. There were a couple of instances of:

onclick="popUp(this.getAttribute('href')

instead of:

onclick="popUp(this.getAttribute('href'))

Note that a closing parenthesis was missing. Those are the kinds of errors I need to find: little typos, especially in the code. Glaringly wrong sentences, paragraphs and chapters are out of the scope of a reprint, I’m afraid.

So, if you’re reading the book and you’ve spotted the work of typographical gremlins, please let me know. Simply leave a comment below.

Posted by Jeremy on Thursday, October 27th, 2005 at 1:46am

Comments

Doh. I’ll need to finish quickly then. I have some other typos as well…just hold…one…more…second…

# Posted by Dustin on Thursday, October 27th, 2005 at 6:00am

Pretty minor, but page 25 (of my edition) lists the arithmetic operators and refers to the operator for division as a backslash. I believe that should be a forward-slash (or simply, slash).

# Posted by Shane Bonham on Monday, October 31st, 2005 at 9:37pm

Probably too late to add (and also pretty minor)….but I just got your book the other day. I noticed that at the end of chpt 4 you provide a picture of how the image gallery looks after the mark up is applied. I believe that by using the float: left; in the li tag, the placeholder image will float left as well, unless the float is cleared (atleast this is how it acted in my browser..safari for mac). I just created a .seperate { clear: both;} and applied the class prior to the placeholder. This way the placeholder clears the float and will align under the links, not next to them.

Enjoying the book very much.

# Posted by Kevin on Sunday, November 6th, 2005 at 4:03am

I guess I am too late with these but I only found the book in Brighton Waterstone’s this weekend.

p107 there’s a line

if (whichpic.getAttribue("title"))

which should clearly say "getAttribute".

p196, nothing incorrect but you’ve done something that makes me shout at my year 1 programming undergrads:

if (odd == true)

should just be

if (odd)

This may be a pedagogical decision on your part I suppose but I strongly object to using == to check boolean data.

Also I’d prefer the two lines

odd = false; and odd = true;

to come outside the if-statement and coexist as

odd = !odd;

which makes it clear that you’re toggling.

Very nice book, clear explanations etc. I want to buy you a beer in Brighton sometime.

Guy.

# Posted by Guy McCusker on Tuesday, November 8th, 2005 at 2:19pm

Guy, we should definitely get together for a beer sometime.

Thanks for pointing out that typo for page 107. Unfortunately it’s too late now to get it into the reprint but I’ll add to my list.

As for the whole toggling of the "odd" variable, yes, I did do it for pedagogical, rather than coding reasons.

You’re right: the changes you suggest would be more elegant, but then I would also have to explain exactly what was going on. By simply writing code that’s close to the English, "if odd is equal to true…", the flow of the logic is fairly clear without any extra explanation.

There’s quite a few places in the book where the code could be shortened and improved considerably, but I generally chose readability and clarity at the expense of code elegance.

Also, I’m sure many programmers would balk at my constant flaunting of structured programming best practices. Again, it was readability I was striving for.

Now, about that beer…

# Posted by Jeremy Keith on Wednesday, November 9th, 2005 at 8:24pm

Sorry. Comments are closed.

October 2005
SunMonTueWedThuFriSat
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Recommended Reading

XML Subscribe

Grab the RSS feed for this blog.

JavaScript API

Grab the RSS feed of comments for this entry.