Don't you love getting a kick in the teeth first thing in the morning? That's what often happens to me when I read my email immediately after turning on the computer, even before my shower and breakfast. People send me emails that are obviously written in total innocence and with the purest of intentions, but like a clumsy oaf carrying a 2-by-4 beam, succeed in smashing me in the face and making me feel bad for the rest of the day.
The email this morning was about the last program in Chapter 1 of 3D Programming for Windows called Tinist3D.xaml. My correspondent wondered why the triangle shows up as black.
Gosh, I don't know. Perhaps we can discover why by reading the paragraph immediately preceding the program:
"By taking advantage of defaults -- and by being aware that the absence of a light source causes objects to be rendered as black -- you can actually create a functional 3D scene in just 14 lines of XAML ...."
This would also be obvious from much else in that first chapter as well.
I can only conclude that either:
1. My correspondent has downloaded the source code from 3D Programming for Windows but not actually purchased the book; or
2. My correspondent has purchased the book -- (Hooray! I get $3 in royalties!) -- but not actually read it, perhaps not trusting that the text of the book will provide information that the reader actually needs.
Either of the two possibilities is quite distressing, but the two explanations are related:
I know that many people don't trust books any more. I'm not sure why. It baffles me that I can spend six months of my life carefully crafting a book about WPF 3D, and potential readers just assume that the book can't possibly contain anything of value. This mistrust is, of course, one of the reasons why many programmers don't buy books any more, and why people like me -- who have spent decades developing the skill of dissecting and explicating APIs -- are finding it so hard to make an honest living.
The whole incident considerably dampens the enthusiasm I felt when I first woke up, and I knew that today I would be making a serious dent in the Silverlight Raster Graphics chapter of Programming Windows Phone 7. If people aren't actually going to read the book, exactly why the hell am I wasting my time writing it?