April 11, 2007

when do not generate code !

     Currently code generation is very common way of some handling common repeating code fragments and some initial setup task like startup configurations and so on. Some clear benefits are:
  • ease your setup process
  • protects your code form some common coding mistakes
  • maintain some coding pattern practices and standards.
  • keep your effort on complex tasks
But on the other hand when you evaluate code generator or while writing your code should thing about " why you generate this code ? and not writing some generic component to evolute such business"
 this is the most common mistake while using this technology. you generate code to customize the generated code. If you not need this fragment to customization. DO NOT GENERATE IT. otherwise in most case any enhancement in these fragments will require great effort or worse (to generate again).

so what is important.
  • more less code generated more perfect it is
  • more easily you customize it more useful it is
Some code generators:

No comments: