It's funny, I recently published an HTML5 book, and can say that in the book itself this problem is largely caused by the publisher and their space contraints. So much copy text and code samples get cut just to "make it fit" in pages divisible by 16. Pain.
However code examples that appear on the book's site obviously have no such constraint, and as such may just be formatted as per the author's personal taste. Either way, no one is happy :)
Speaking of the book itself, it's not bad. Though I thought they glossed over the Canvas too quickly, and could have spent more time on helper libraries, like jQuery, etc.
For my book, 80 characters was the line max. It was difficult for a few JavaScript things, but it just meant breaking one-liners apart into two liners, or breaking long script includes appropriately.
Hey, I have your book! "The Pragmatic Programmers: HTML5 and CSS3" right? :)
You were lucky because you consistently had the entire page width. For mine, because the book's formatting was pre-defined, the column width was variable depending on content type. I could have anywhere between 20 to 65 chars for code. The only place I had control was in the screenshots of code in Vim, but even Production decided to scale those down to make it fit.
I can't imagine writing for another publisher after hearing about all the awful things that happen to people's books. I'm very lucky. Sounds like you had a really rough time. :(
Honestly, it was a great learning experience and I'm glad to have been given the opportunity. After two books (the first one on Perl last year) I toyed with the idea of turning this into a career, but financial reality set in :)
Oh, yea! You were at code camp! I didn't make it this year, but you did some pretty good talks at the one last year. I won an e-book copy of that book, then my nook broke.
I own the first edition. It's a decent, high-level overview of the changes since HTML 4. It assumes that you have a good understanding of CSS and JavaScript also. However, I don't know CSS or JS and I still learned quite a bit from the book based on the fact that I understand programming concepts in general to have a decent idea of what the JS code is doing.
Overall, the first edition was a little lean on content, but I saw today that the second edition was out and is about twice as long, so that may be improved.
I was given this book last Christmas. It's a great overview of HTML5's features. I also met Bruce Lawson in London earlier this year. Definitely worth checking out.
I own and read both books. Mark Pilgrim has a more straightforward approach and his book seems to be more about getting things done. I usually use it to get ideas whilst working on an implementation or use it as a reference.
Whereas Introducing HTML5 is a great read and gives a lot of background information about certain design choices. It also covers almost everything. It's my favourite HTML5 book.
As for one last comparison, I think a newcomer would find it harder to follow Dive Into HTML5 but you get sucked into Introducing HTML5 really fast. In a couple of chapters, it gives you enough to start playing with this new thing you've learnt.
I'm not going to judge a book by its cover. All I can see here is list of chapters and some links to related projects. Unlike Dive into HTML5, there is no free online html version of book here. May be someone who have read it can tell it better.
However, I found these resources on html5 to be very informative.