Then a year or so later the client brings us back in to help diagnose and fix why their delivery dates continue slipping and number of bugs in production is increasing. Finds out a new, very vocal hire, came in, saw the repetition and decided to build a "service service". A service, into which you would pass a single python file of pure business logic encoded as a b64 string, with some decorators, and it would set up the endpoints, serialization, DB, etc automagically.
Don't be clever
11–20 of 231 posts
Re: Don't be clever
#12Jajajaja, we know - "clever" doesn't mean "smart" anymore but "overcomplicated". Nothing to see here, please move on...
Re: Don't be clever
#13Especially repetition seems to be hated with the might of a thousand suns and while I get it, because I myself hated it, I now can see the beauty of it.
What is currently a superficial repetition - a bunch of endpoint handlers, some forms - will often turn out to be similar-looking instances of completely different problems. Repetition is quite often deeper than just "code looks the same".
It takes a while to get to know these nuances.
Re: Don't be clever
#14Re: Don't be clever
#15No, please don't. This is jumping from the frying pan into the fire. If you think abstract base classes can be clever and hard to understand, code generators can be even more so. In addition, because code generators are a one way conversion, and the generated code evolves independently and the code generator itself is evolving independently, you end up with a bunch of things that are subtly different yet somewhat related in a way that you will need an advanced degree in evolutionary biology to understand.
Re: Don't be clever
#16> Yes, I had failed to see the proper solution: a class generator
Looks to me like the problem is actually object orientation
Re: Don't be clever
#17Re: Don't be clever
#18At a consulting gig I did, we were bootstrapping a brand new python engineering team for a new line of products. We chose the frameworks, set standards via decision records, wrote a template service that you would copy paste, and build on top. Cross cutting concerns were pulled out into a library that all of these services installed. Most things were standardized, all APIs felt like they were written by a single pers…
you built a system for cogs.
someone hired a thinker.
Re: Don't be clever
#19> Yes, I had failed to see the proper solution… It actually existed back then, I simply didn't know about it, no one told me about it, and I wasn't smart enough to question myself once I started going down a certain path. And there’s your problem right there: Assuming that nobody has ever tried to solve this problem before so not bothering to look around at existing solutions. This is a failure of lack of context , i…
Clever works great outside of your actual business code.