Metaprogramming how much is too much?

metaprogramming, ruby

Solution

When it becomes too difficult to

- test

- debug

- understand

- maintain

then it's probably too much. Metaprogramming is supposed to simplify your daily development. If you end up spending more and more time maintaning complicated code base, you probably need to simplify it.

Problem

As I have become more and more comfortable using metaprogramming techniques I have found more and more applications for metaprogramming as well. I'm working now on a little project in which I am creating classes and instances of these classes on the fly and I'm wondering if I have taken metaprogramming too far? Is there such a thing as too much metaprogramming? If so, where does one draw the line?

Original source