How Terrible Code Gets Written By Perfectly Sane People
From Christian Maioli Mackeprang, the following:
Legacy code can be nasty, but I’ve been programming for 15 years and only a couple of times had I seen something like this. The authors had created their own framework, and it was a perfect storm of anti-patterns. …
And yet, it was not the code’s dismal quality that piqued my interest and led me to write this article. What I discovered after some months working there, was that the authors were actually an experienced group of senior developers with good technical skills. What could lead a team of competent developers to produce and actually deliver something like this?
I don’t necessarily buy all of these, but they’re worth thinking about:
-
Giving excessive importance to estimates: “Your developers might choose to over-promise instead, and then skip important work such as thinking about architectural problems, or how to automate tasks, in order to meet an unrealistic deadline.â€
-
Giving no importance to project knowledge: “If you’re in a large project and there are modules for which you have no expert, no-one to ask about, that’s a big red flag.â€
-
Focusing on poor metrics such as “issues closed†or “commits per dayâ€: “When a measure becomes a target, it ceases to be a good measure. (Goodhart’s law)â€
-
Assuming that good process fixes bad people: “[Fix your hiring.] Talent makes up for any other inefficiency in your team.â€
-
Ignoring proven practices such as code reviews and unit testing: “Refraining from using tools such as modern IDEs, version control and code inspection will set you back tremendously.â€
-
Hiring developers with no “people†skills: “It doesn’t matter that the other guy might be ten thousand miles away. One Skype call can turn a long coding marathon into a five-minute fix.â€
Conclusion? “What you can’t assume is that just because you’ve signed up to apply Agile or some other tool, that nothing else matters and things will sort themselves out.â€