| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) | |
|
Grumpy old man
Join Date: Oct 2007
Location: North Japan
Posts: 1,617
|
Not so bulletproof Mr. Keith
Picked up a copy of Jeremy Keith's Bulletproof Ajax because I'd heard it wasn't bad and I thought I'd see what his take on it was. Found a stonking error on page 26. Text reads as follows: Quote:
Talk about ironically (and erroneously) illustrating your very point. |
|
|
|
|
|
|
#3 (permalink) |
|
Shitcasket™
|
Excellent. I'll have to rub his face in it when I see him. He couldn't recommend the book highly enough when we first met! Freelance Brighton | Design Agency Brighton | Twitter | Linkedin | Plurk
Follow DT updates on Twitter: http://twitter.com/designerstalk |
|
|
|
#11 (permalink) | |
|
Grumpy old man
Join Date: Oct 2007
Location: North Japan
Posts: 1,617
|
Quote:
It's a bit of code called a while loop. Basically it does the same operation over and over until a particular condition is satisfied, and it stops looping. In this case when a variable called 'i' (a stored value) reaches 5, the loop will exit and the program will continue. However in this case, the value of i never increases and always stays at its initial value of zero (he keeps adding to another variable called 'x' instead). Basically this code will keep causing the browser to produce endless popup alert boxes forever. Although I haven't tried it, it would probably annoy someone who tried to run it because alert boxes tend to control the mouse focus on OSs like Windows, so it might be difficult to kill. The irony is that in the paragraph leading up to it, he warns about how mistakes in loops can make them endlessly repeat and then goes and makes that very same mistake. |
|
|
|
|
#12 (permalink) | |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,937
|
Quote:
I understand deadlines and all that malarkey, but I always find it odd that tech authors don't run every scrap of code they print/recommend before committing it to the book. |
|
|
|
|
#14 (permalink) |
|
shiro
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,214
|
Most likely. My boss tasked me with learning to make yahoo widgets this week. So I downloaded the developers kit and was going through the reference manual, and found a few errors. Maybe Yahoo should take that offer from microsoft - it looks like they cant afford to hire proofreaders! |
|
|
|
#15 (permalink) |
|
Grumpy old man
Join Date: Oct 2007
Location: North Japan
Posts: 1,617
|
Occasional proofreading errors I can cope with. I actually did a certain amount of freelance proofreading when I first came to Japan and it is very difficult to spot every single last mistake. But when an author specifically issues advice about a problem, even going so far as to describe it as "important" and then fucks up and makes the very same mistake less than an inch further down the page, it just makes him look stupid. |
|
![]() |