Charles Petzold

Early Reviews of “Apps=Code+Markup”

September 3, 2006
Roscoe, NY

Copies of my book Applications = Code + Markup: A Guide to the Windows Presentation Foundation are now circulating among the people at Microsoft who actually made the WPF and XAML. I'm always nervous when this happens, but so far I'm being treated kindly by Tim Sneath, Pablo Fernicola (with a great photo), and particularly by Karsten Januszewski, whose discussion of the book made me weep as much as Andre Agassi saying goodbye to his fans this afternoon at the U.S. Open.

Of course, all three of these guys have already received thanks in the book's Introduction, primarily because I found their blogs useful at various times during the writing of the book. Like most programmers, whenever I hit an API or coding snag that doesn't seem addressed by the SDK documentation, I'll use Google to see what I can find, and quite frequently a blogger has already provided the solution, and quite frequently it'll be a Microsoft blogger.

"Not to diss the SDK," as Karsten says. One of the real pleasures of programming for Windows for, umm, 21 years now, is seeing how much better the SDK documentation has gotten. Whenever I started a new chapter in this book, I'd print out the "Overview" and "How-to Topics" from the SDK, and read the material closely with a red pen and Post-It tags.

But what the SDK documentarians are doing and what I'm doing are very different. SDK documentation has to make sense when randomly accessed. A tutorial — which is the only kind of book that I know how to write — should present a coherent progression through the material, a narrative perhaps, that starts from zero and ends (in the best case) with much accumulated knowledge and wisdom.

To me, one of the biggest challenges and biggest pleasures of writing such a book is ordering the presentation of material so that each chapter builds on the previous chapters, and I think the book makes most sense when read like Karstan is reading it.

As an independent author (or so I like to think), I have certain freedoms that SDK documentarians do not have. I can be idiosyncratic. If after much consideration I decide that Chapter 2 of the book should cover solid and gradient brushes, I can do that, although both you and I would be shocked to find an official SDK tutorial taking that approach.

Of course, I can be idiosyncratic to a fault, because I also tend to be a stern teacher, and if I decide that the reader of my book should have a solid foundation in writing WPF programs in C# before learning about XAML, I'll do that as well. I know that some readers aren't going to like that approach, and it may even hurt my sales, but I hope at least a few readers eventually thank me for doing it this way.