Friday, February 01, 2008

Code Generation - Good or Bad?

I am planning to put my thoughts about this subject on my blog. But wanted to know what people think about this in the meantime.

Please leave comments.


Rahul said...

I think Code generation needs to be used in moderation.First of all the generated code should be readable.
The motivation behind Code generation should not be "I dont want to write such complicated code",It should be "I dont want to write the same code over and over" or "I dont want to remember the exact format of an XML file".
Generated code should be something that you might be able to change to your applications specifications.
Also the generated code should not be a must for the whole application,use it where required.And dont program with the generated code in mind.Remember this generation is to make ure life easier!!!!

Sawan Kuntala said...

I agree with you rahul. I intend to write on this issue with specific examples like dao layer generation, the advantages , disadvantages and the solutions we can adopt to decouple the application from code generation tools. share your thoughts on best practices when it comes to code generation, thanks.

Rahul said...

That would be great,Looking forward to some insight from you.