@ben "Let's take a moment to understand why this approach was the best one at the time of writing.
...
Given the constraints and the resources available.
...
Given the skillset of the people that had to make it work.
...
Given the state of the industry.
...
Ok this one might just have been a mistake"
@ben that's at least my approach when teaching people to work with legacy code.
Nobody wants to do bad work and nobody is the villain in their own story. So let's see if we can understand constraints and motivations and go from there.
@ben From non senior devs I saw a lot of those complaints coming from a "it's not my fault" place.
Especially Germans where complaining about something is how we say hello.
And people want to proactively communicate that maybe there will be issues, but pick an approach that isn't very healthy.
"Legacy code means your business was successful. The reason you have a salary now is because someone got the project to this point. These are their stories and trade-offs".
@ben We're all still learning constantly and things could always be more optimal.
Hindsight is 20/20 and there is a ton of discovery work that happens while writing something that isn't obvious until after it's complete. Due to time constraints we can't always go back and fix every little "mistake" or inefficiency.
Keeping this in mind and having empathy towards yourself and other devs will go a long way. Sometime I look back at code I wrote a few months ago and wonder what I was thinking.