Example code for the Shell Coder's Handbook