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.
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.