You are here: Home Dive Into Python 3

Colophon

Je n’ai fait celle-ci plus longue que parce que je n’ai pas eu le loisir de la faire plus courte.
(I would have written a shorter letter, but I did not have the time.)
— Blaise Pascal

 

Diving In

This book, like all books, was a labor of love. Oh sure, I got paid the medium-sized bucks for it, but nobody writes technical books for the money. And since this book is available on the web as well as on paper, I spent a lot of time fiddling with webby stuff when I should have been writing.

[typewriter]

The online edition loads as efficiently as possible. Efficiency never happens by accident; I spent many hours making it so. Perhaps too many hours. Yes, almost certainly too many hours. Never underestimate the depths to which a procrastinating writer will sink.

I won’t bore you with all the details. Wait, yes — I will bore you with all the details. But here’s the short version.

  1. HTML is minimized, then served compressed.
  2. Scripts and stylesheets are minimized by YUI Compressor (and also served compressed).
  3. Scripts are combined to reduce HTTP requests.
  4. Stylesheets are combined and inlined to reduce HTTP requests.
  5. Unused CSS selectors and properties are removed on a page-by-page basis with a little help from pyquery.
  6. HTTP caching and other server-side options are optimized based on advice from YSlow and Page Speed.
  7. Pages use Unicode characters in place of images wherever possible.
  8. Images are optimized with OptiPNG.
  9. The entire book was lovingly hand-authored in HTML 5 to avoid markup cruft.

Typography

vertical rhythm, best available ampersand, curly quotes/apostrophes, other stuff from webtypography.net

Graphics

Unicode, callouts, font-family issues on Windows

Performance

"Dive Into History 2009 edition", minimizing CSS + JS + HTML, inline CSS, optimizing images

Fun stuff

Quotes, constrained writing(?), PapayaWhip

Further Reading

© 2001–11 Mark Pilgrim