|
|
|
|
|
by adamrmcd
5328 days ago
|
|
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.