code examples for my blog posts on the-diary-of-a-wimpy-coder.blogspot.com