Code used in my software pattern presentation