source code from "Code Generation in Action"