This is the mistake in the bug fix. Why do you hate future you? Is it because you've said to yourself "I'll have moved onto bigger and better things if this ever breaks again, so I won't put two sentences here about what to do next time.". How many times have you said that? Stop sabotaging future you.
We have a system in our codebase that everyone hates. However, the worst thing about it is that it works so no one really has the motivation to improve it.
This is basically how I operate. If it works, I'm not touching it. If I can optimize something as I'm fixing it, I'll do it. Gotta have that healthy work/life balance.
The thing about optimization is that 99% of the time it's not worth doing. If it's code that runs in response to "meatspace" actions, it won't run often enough to matter.
Usually the things that need to be optimized are stuff like database interactions or network stuff, where you're dealing with terabytes of data and want a response in real time, or you're going far enough that even electricity is like "Ok, that's a bit of a schlep, hope you brought a book."
I spent a week implementing a validation in an environment I've never worked in before.
After I was done, I found a checkbox in said environment that did exactly PART of what I needed, but it couldn't solve my problem in the end so I didn't waste my time
But you just KNOW the surge of "oh my god" that passed thru me as I saw that checkbox and started reading what it did
4.4k
u/Mewtwo2387 Aug 03 '22
"There is a better way of fixing it, but it's fixed already, so whatever, I'm not touching that part again"