To a lisp programmer this would be second nature (they'd wonder why it's so special) but in other languages it can be quite a hassle to keep multiple instances around of similar code.
Code generation is a real booster, the biggest gains I'm getting are 100:1 (a small 10 line definition spitting out a 1000+ lines of code), there is nothing to re-factor just update the generator inputs and hit 'make', old generated code is stripped, new generated code will be inserted into the project so you can inspect it afterwards (and to the compiler it looks just like ordinary human written code). The code generator writes comments as well to clarify the output.
Writing the generators can be quite tricky, you have to think on two levels at once (the code you're writing and the code you want to generate). There are some shortcuts here to make that process easier.
The end result of this process is to have code produced very with - once a single example has been produced and debugged - a much reduced chance of errors.