AngryCoder: "...the myth of the code generator."
.Avery Blog: "What he misses is that there are code generation tools out there like CodeSmith which make it very easy to generate select parts of your application."
Frans Bouma: "...the article misses the advantages of code generation and how it can benefit you in your daily life. I'd say: the article is totally wrong."
The last company I worked for (back in 1999-2000) produced a code generator. We took a UML model from Rational Rose and generated DB schema (complete with foreign key RI, auto-generated primary keys, etc...), stored procedures and VB business objects. We also had a rudimentary DHTML form designer which could look at one of our business objects and generate a basic UI with query/add/update/delete business logic. We could go to a prospect, create a couple of UML classes, generate all three tiers and demo a working app in about 10 minutes. Sure the UI was pretty ugly, but it was the time savings that our clients liked.
The Angry Coder dismissed the time saving idea because "You've got to pore through the code and figure out what the heck the tool just produced. That takes time." As much time as it takes to start from scratch? I don't think so. And what about templates? He never even addressed that issue and that's one of the things that can negate the "what did the tool just produce" issue. Tools like CodeSmith use ASPX style templates. Our generator integrated with the VBScript engine to do the generation. And you could create your own scripts to tailor the code generation to your liking. That's value.
Is code generation for everybody? Definitely not. I'm not going to try and sell a code generator to a Sam Gentile or an Ingo Rammer. Where we had success was internal IT shops that had to crank out utility apps for departments all the time. Simple DB add/update/delete/query code was 80% of their work. You give them a tool that reduces that time and frees them up to do other things and you've helped them out.
I think code generators are an extension of frameworks. With a framework (like .NET, Java, etc...) you've got a bunch of functionality pre-built for you -- this saves you time. With a code generator, you've got the ability to customize pre-built functionality. And you do it in a lot less time and with less debugging required. That's value.