Also most attempts at code quality lead to even worse code - into overengineered abstraction layers that no one will be able to adjust once it's inevitably realized that the assumptions were all wrong.
Totally. YAGNI - you ain't gonna need it. That beautiful framework you spent extra weeks writing,
designing from first principles, turns out to be the wrong layer of abstraction because of a bad assumption. the client left off critical business logic details, or a pivot to a more popular feature of the program. The only question then is how to get out of that tech debt.