Code for blog post #3.