where I currently work, there is a team that uses code-generation to generate slight variations of a program. I find this a little bit awkward. I can imagine using code generators that produce complex code for stuff that is usable in different projects, but using a code generator just for variations of an existing program seems overkill to me.
I believe that code-generation is no good solution for this, because you create many versions of a certain program which in my eyes is hard to maintain. I believe you should try to use object-oriented programming (or another paradigm) to make one program flexible so it can handle all the required variations you need. This way you only have one version to maintain.
I was wondering what you think about it? When is using a code-generator really useful? Always? Or only for complex things?
I hope to hear some great thoughts about this, because to me it seems such an overkill.