Coding Horror

programming and human factors

How Not To Write a Technical Book

If I told you to choose between two technical books, one by renowned Windows author Charles Petzold, and another by some guy you've probably never heard of, which one would you pick?

That's what I thought too. Until I sat down to read both of them. Take a look for yourself:

Charles Petzold's Applications = Code + Markup:

Petzold WPF book, sample page 2   Petzold WPF book, sample page 2

Adam Nathan's Windows Presentation Foundation Unleashed:

Nathan WPF book, sample page 1   Nathan WPF book, sample page 2

Beyond the obvious benefit of full color printing, which adds another dimension to any text, it's not even close. The Nathan book is the clear winner:

  • It's full of diagrams, screenshots, and illustrations showing the meaning of the code.
  • The text is frequently broken up by helpful color-coded sidebars such as "digging deeper", "FAQ", and "warning".
  • The code/markup snippets are smaller and easier to digest; they don't dominate page upon page of the text.
  • Liberal use of bullets, tables, subheadings, and other textual elements provides excellent scannability.
  • The book has a sense of humor without being obnoxious or cloying.
  • Did I mention it's in color?

The Nathan book is brilliant. It reads like a blog and competes toe-to-toe with anything you'd find on the web. Petzold's book, in contrast, is a greyscale sea of endless text and interminable code. There are so few diagrams in the book that you get a little thrill every time you encounter one. It also artificially segregates code and markup: the first half is all C# code; it's not until the second half that you see any XAML markup whatsoever, even though XAML is one of the most important new features of WPF, and the one developers will be least familiar with.

I suppose this sort of old-school treatment is typical Petzold. What do you expect from a guy who thinks Visual Studio rots the minds of software developers? The difference in approach is immediately obvious to anyone who opens both books. One looks compelling, fun, and inviting; the other looks like a painful, textbook slog that's the equivalent of writing code in Notepad. Petzold's an excellent writer, but writing alone can't make up for the massive layout deficiencies of his book.

It's too bad, because I loved Petzold's earlier book Code, which was a love letter to the personal computer filled with wonderful illustrations. As much as I respect Petzold, you should avoid his WPF book. Get the Nathan book instead-- you'll love it. Publishers, take note: I'd sure be buying a heck of a lot more technical books if more of them were like this one.

Written by Jeff Atwood

Indoor enthusiast. Co-founder of Stack Exchange and Discourse. Disclaimer: I have no idea what I'm talking about. Find me here: