It’s time for a show of hands. How many folks have ever had the following happen to them:
1. Get excited over a shiny new component, object, or service to integrate with your project.
2. Download the SDK and API docs.
3. Copy and paste some trivial examples into your project to learn about the new API.
4. Son of a …. The examples don’t work!
If you’re fortunate, it’s just a missing semi-colon or other typo that’s easy to find, easy to fix. If fortune is not on your side, it will be the following scenario that happened to me roughly this time last year.
Here, I show a new approach to putting example code in printed form that prevents errors from appearing during the documentation writing process.