With the prevalence of patterns in programming and seemingly routine stuff that we write one way to make things interesting would be to not write the code itself but write code generators that produces the required code. This would be especially valuable in code bases where multiple modules all have similar code but differ only due to the attributes of the source classes.
Thinking in terms of meta programming would also mean that LOC's of generated code does not matter. If you can do it for 1 class then you can do it for any number of classes.
Some things I see as a potential problem
1) Version history of the generated classes would be meaning less. They would be a by product of code generators version history
2) Exceptions in logic individual modules would lead to lot of branching in code generators.
I feel that the typical service calls, data mapping from layer to layer etc. are excellent candidates for Code generation. This also would be much much more interesting than simply churning out routine code.
No comments:
Post a Comment