Sunday, December 16, 2012

Examples of good code-based digital publications?

In my last post, I wrote:
I [want] to ensure that [my next] book looks good on all target platforms, by which I mean ink on paper as well as various digital representations (e.g., PDF, HTML, ePub, etc.)  I've noticed that many books containing code examples display, er, suboptimally on one or more digital devices, and I want to avoid that.
Over the years, I've heard many complaints about the appearance of code-heavy publications (book or magazine article or blog entry, etc.) on digital devices, but I can't recall any cases of people praising the appearance of a programming piece on the device they use.  I'd like to believe that this is just because I'm wallowing in ignorance.  If you have read a code-heavy publication on a digital device where you felt the job was done well, please tell me!  I'm primarily interested in mobile devices like phones, e-readers (e.g., Kindle or Nook) or tablets.  PDF on a large laptop is not hard to get right.

If you have an example of code-heavy publishing done well on a mobile device, please email or post as a comment the following information:
  • The device being used
  • The title of the publication
  • The publisher
  • The author
  • What about the experience you find especially well done
I really want to do a good job porting my book to various platforms, and the more I can find out about successes that precede me, the better I can do.

Thanks,

Scott

17 comments:

Unknown said...

*chirp* *chirp* *chirp*

Scott Meyers said...

@Eric Niebler: I'm sorry, Eric, I don't speak chirp. Can you elaborate for the chirp-challenged?

Thanks.

Vasiliy Sorokin said...

@Scott Meyers: I guess Eric has in mind you need try to use Twitter service for your question, because Twitter is a good platform for getting statistic information from many people

Vasiliy Sorokin said...
This comment has been removed by the author.
Garciat said...

Device: Nexus 7
Publication: CLR via C#, 3rd ed.
Publisher: Microsoft Press
Author: Jeffrey Richter

There really isn't much to say, but I've had no problems reading so far. I suppose this is good.

What I like:

Monospaced font
Tab width

How it could be better:

Visual cues (coloring, bold font) for keywords, variables, etc.

Dragonmaster Lou said...

I'm gonna toss in 4 different ones here, with different approaches to the problem.

Device: iPad 3
Publication: Head First iPhone & iPad Development
Publisher: O'Reilly and Associates
Author: Dan Pilone

What I like: They get away with a lot because it's only available as a PDF file. It does make sense to an extent as the Headfirst series takes advantage of all sorts of crazy layouts that probably can't be done in any other format. This PDF is the same file used for laptops, etc., so perhaps you do need at least a 10" tablet screen in order to see it correctly.

Device: iPad 3
Publication: Cocoa Fundamentals Guide
Publisher: Apple
Author: Apple

Apple really knows how to take advantage of its iBooks format (which I believe is an extended version of EPUB) with its developer publications (which are all free, by the way, if you own an iOS device if you want to check them out for yourself). Nice clean layout, monospace fonts with nice tabs, and so on.

Device: iPad 3
Publication: JavaScript Web Applications
Publisher O'Reilly and Associates
Author: Alex MacCaw

Pretty much the same niceness as the Apple publications. These are available in EPUB format (the one I'm looking at right now) as well as Mobi and such, so they don't have the layout advantages that the Headfirst series's PDF versions do. However, it's a clean layout, nice typography with the code examples, and so on.

Device: iPad 3
Publication: What is HTML5?
Publisher: O'Reilly and Associates
Author: Brett McLaughlin

This was a freebie I got from the Kindle store a while back. I'm including it here to give an example of a nicely done Mobi formatted book. It holds up pretty nicely compared to O'Reilly's EPUB books for all the same reasons I mentioned previously.

Unfortunately, I don't have my e-ink Kindle on me, so I can't tell you how things look on a smaller device when you only have a monochrome screen. I do think the device does make a huge difference, though. Your Effective C++ book, for example, looks significantly better on my iPad than it did on my e-ink Kindle.

Scott Meyers said...

@Sorokin Vasiliy (and Eric): All my blog posts are reflected to my twitter stream @Scott__Meyers. Is there more I should be doing?

Scott Meyers said...

@Garciat and @Dragonmaster Lou: Thanks for the suggestions. I plan to check them out.

Anonymous said...

I always thought that Mark Pilgrim did a good job with just HTML5. You can see an example at http://diveintohtml5.info

I believe that he was using the HTML5 source to generate all the formats that he and his publisher sold.

Unknown said...

Scott, it's the sound of crickets, the response I would expect to a request like, "If you have read a code-heavy publication on a digital device where you felt the job was done well, please tell me!" It's my comment on the sad state of affairs. A joke. Laugh.

Never mind. ;-)

Scott Meyers said...

@Eric Niebler: Ah, now, Eric, you know it's not nice to tease the intellectually challenged... :-)

Scott Meyers said...

@Anonymous: Thanks for reminding me of Mark Pilgrim's book. That also led me to O'Reilly's commitment to ebooks and to the satisfaction guarantee that sits behind it. It's an impressive combination.

I'd be very interested to hear from people who read O'Reilly books on mobile devices. Are you happy with them?

Dhruva Krishnamurthy said...

A code intensive book is very difficult to read on a mobile or even a 7 inch tablet. I gave up on that a while ago and prefer to purchase a printed version that I can flip. I use Safari account to search and read specific chapters at work.

Anonymous said...
This comment has been removed by a blog administrator.
mrts said...

These may be useful:

https://github.com/PascalPrecht/wbb
https://github.com/progit/progit

Scott Meyers said...

@mrts: Thanks for the links. I'll check them out.

Anonymous said...

One of the few technical ebook well presented imo.

Parallel Programming with Microsoft® Visual C++®
Design Patterns for Decomposition and Coordination on Multicore Architectures
By Colin Campbell, Ade Miller
Publisher: Microsoft Press
Released: March 2011
ISBN 978-0-7356-5174-6

Good points for me (on kindle touch epaper)
+no "crazy line break" in samples.
+not too much links. It's really annoying when a page has so many links to cross references that you have to be careful where you put your finger to be able to turn a page without going to link.