|
> If you're tired of working with legacy code without tests, most of your suggestions for improvements will be met by a shrug. We don't have time for that now. It's more important to deliver value to the customer. This is what bothers me the most. Whether it's about tests or something else. Even clean slate "let's get everything right this time" projects degenerate into legacy code within weeks with this mindset. The "It's more important to deliver value to the customer" line is especially insulting, since it's not as if the developers are trying to sabotage the delivery of value by writing tests or sanitising input or whatever the conflict is about. We know that high quality code is faster and cheaper to build than low quality software, but it's counter-intuitive to most managers. And you need sympathetic managers to get the software right. Business rules are rarely clear, orthogonal or consistent. Which is not actually a problem for humans, but until we have artificial general intelligence, it is an insurmountable one for computers. But unsympathetic managers will not want to have long, uncomfortable conversations about deducing what they actually need from what they think they want. So developers are instead forced turn messy rules into messy code as best as they can, and put out fires whenever they break out, which they will all the time. And perhaps the most insidious thing of all, spending all the time putting out fires means they don't get real world experience they need to build a robust system on time. If managers let them try once it would just make them look incompetent. And if they quit, their experience putting out fires will be worth nothing to companies who actually value proper workmanship. Their only option would be to join another death march company. I think this the biggest reason why most software, especially enterprise software, is so bad, and isn't likely to improve in the foreseeable future. |
A dev who's also focused on "how can I deliver value to the customer" is really the only person who can make the right choices there, because the code has to be designed to make sure future valuable changes can be made, vs designed for a specific "snapshot" of specs.
And yeah, it often becomes a cycle, where management doesn't trust devs to build systems that won't suck, because devs haven't shown they can build systems that won't suck, because they're constantly just fighting the old systems that suck instead of having good training/experience building ones that don't... but I can't put that on non-technical management. We don't want non-technical management trying to tell us how to build a system, we just have to get better at it ourselves. You can do that by working on a bunch of broken systems, but you have to be thoughtful about it, and reflect on what you learn, and not just be distracted by "ooh, new shiny framework will make this better!"