Code Generation - Letting the computer do the repetitive work.
Code generation is in use all over the software industry:
Every person I have talked to in this industry has used code generation in some form. Very few understand the true power of good code generation.
Good Code Generation -
Each of the tools above has some of these characteristics. Other than the ones I have built and used very successfully I have yet to see a commercially available code generator that has all of these abilities.
Object oriented application frameworks are intended to provide a basis for creating business objects. Traditionally, there would be base classes and developers would create derived classes that have all of the code to process the specific types of data. Many tasks like persisting data in databases and passing data between object tiers and simple validation (numeric ranges, date ranges, value lists, etc.) require very similar code in every single business object. A developer can create additional base class functionality and use meta data to make decisions at runtime to select the correct routines for each attribute. This methodology is processor and memory intensive and does not scale to large applications well. By using code generation all of this code and all of the decisions can be produced at compile time mechanically. The developer can then spend their time writing the business logic that is beyond the scope of the code generation.
Rather than describing many different projects I have used code generation to reduce initial development, maintenance and stability, I am going to describe a how a typical project uses code generation.
I have used this model on multiple projects which has allowed three or less developers to create and maintain systems in excess of 1 million lines. These systems have scaled from small systems in Windows to huge systems on UNIX without any significant problems.