4 ms·
I am currently in the catfish position and have been for a few years. In my experience the #1 reason that people reach for metaprogramming (maybe 90% of all ca
by calpaterson 9y ago
I am currently in the catfish position and have been for a few years. In my experience the #1 reason that people reach for metaprogramming (maybe 90% of all cases) is that they have just learned about the technique in the language and have not yet learned about the readability (and often performance) disadvantages.
For background, right now I am working with an internal Python framework which creates key classes from mixins at runtime with Python's type() constructor. Figuring out what is going on at any given time is very difficult and interacting with it takes days longer than would be needed normally. The author is an inexperienced Python programmer working on a key library for a very large company and we are unable to throw his work away for organisational reasons (the framework team has a lot of political will). Not sure how to think about it. These people's poor quality work keeps me in a job but honestly it makes me feel bad for all the time and money that the client is wasting.