upvote
Here's a 26-year old post on the exact topic of messiness you raise:

https://www.joelonsoftware.com/2000/04/06/things-you-should-...

A decade ago, I was sitting in on a meeting about a rewrite and, before I could say anything, someone in the first year of her career asked why anyone thought a rewrite would be any cleaner once all the edge cases were handled. Afterwards, I asked her where she learned this. She said "I don't know, it just seems kind of obvious." She went on to be a great engineer and is now a great manager.

reply
I work on internal facing software and every rewrite I've seen in 20 years suffers from the same symptoms. The code/system is a mess because it has been exposed to reality for a decade. Reality is messy. That's why they pay us money, believe it or not.

Greenfield guy comes in, promises the world, and starts from some first principles white papered architecture. It's really lovely until they onboard the first user. Then they slowly commit all the "sins" (features that drive revenue) of the first system.

The firm is stuck supporting N systems indefinitely because the perfect new system takes so long to cover even 30% of the original system use cases, that management takes a flier on.. bear with me.. a second rewrite. Now they have 3 systems.

I've seen more 3rd systems than I've seen actual decommissioning of original systems into a single clean new system.

The answer is chipping away, modularizing, and replacing piecemeal Ship of Theseus style. But that does not drive big hires and big promotions.

reply
The bolded quote "It’s harder to read code than to write it." is hilarious given todays context... it has only become more true :)
reply
That kind of self-awareness and humility (and therefore intellectual honesty) is unfortunately really rare in tech for some reason. I don't think there's a way to proactively cultivate it in those who don't have it--if someone has made it to the workplace without having developed it, it's probably too late--but I do think there are ways to select for it by culling those who don't have it when we smoke them out. We ought to do a lot more of that.
reply
It's a dice roll to keep the junior around until he unlearns the wrong bits.
reply
Expert knows when to break the rules
reply
Experts take the time to learn why the fence was there in the first place.
reply
Experts are people who have made all the mistakes there are to make in their chosen field.

Including all of the above.

reply
Experts have beginner’s mind.
reply
tell them they need to turn a profit as quickly as possible
reply
Wait if they can do that they’re not juniors anymore :P
reply