Case Study: Advanced Code Generation and Tooling for very large teams

by Pete Carapetyan


By 2003, dataFundamentals was becoming fairly well-known for its use of code generation and frameworks within the Dallas area java user community.


Large team, significant multiplier

With a challenging implementation to complete, and the efforts of a very large team to gain from any potential multiplier effect, I was engaged to automate as many of the development team's efforts as it could.


Analysis Required!

Ready to generate the required code on his first day on the team, I came up on a new problem that wasn't anticipated. No one seemed to know exactly what it was that created each new component! The app was a J2EE app, but the implementation a highly idiosycratic and proprietary implementation using many non-standard approaches. It took a month of digging and research to come up with the code templates and source files for generating against!


Success beyond expectations - Can you do it again?

If it took 2 weeks longer than expected to come up with the structure to start, the implementation of the generator went much faster than team leaders expected, and working app was deployed in days, for initial inspection.

As with any reasonable code generation effort, it only started with an 75% complete code base, and hand work was expected for the remainder. Further work, with the developers doing the hand work, clarified further automation that was possible, so additional generating routines were written to automate each additional element as it was discovered, getting it to an easy 85% generated/manual ratio.


Easy to use Tools

As soon as the generation routines were at a level where they could be run from the command line when required from the latest source data, the advantages of a graphical tool became apparent for a larger team. I was able to spend a few days and convert the existing command lines tools to Eclipse tools that would run in the developers' existing IDE.


Expanded to Testing Tools

Ahead of schedule and brimming with the enthusiasm that sometimes results from things working out well, management pointed me to the web application testing problem.


Another team member found an Eclipse tool that would work perfectly but it had some missing pieces. As such it had the right kind of license, I was able to make some quick modifications in the tool that expanded it's functionality in several key areas, closing the loop on some critical automated testing that was not thought practical weeks before.