The other day, Jim Bird wrote a pretty good article on why there's so much bad software out that, and the article laid the blame on bad managers. While I think Bird's approach is correct, he's actually missing one critical detail.
It's not always that managers are "bad." Bird's list of badness include poor planning, failure to test at each level of development, failure to talk to customers or put prototypes and minimum viable products in front of them, failing to follow best practices, and ignoring warning signs.
Bird concludes with: "As a Program Manager or Product Owner or a Business Owner you don’t need to be an expert in software engineering, but you can’t make intelligent trade-off decisions without understanding the fundamentals of how the software is built, and how software should be built." Which is completely contradictory advice, because I think you do need to be, or hire, someone who can deep dive into the engineering production pipeline.
The practice of the "five whys" says that asking "Why did this happen?" through five layers of reasoning will bring you to the actual root cause of the problem. There's an old joke that states that the fifth why is always some variant of, "Because we were lazy." The Wikipedia article linked to actually ends with an example of that!
But I think laziness is the second most common problem in software management. The most common problem is fear.
This is most obvious in the high-tech corridors of San Francisco and Seattle, but it's true everywhere. We've created a perverse incentive structure where the best way to move up is to move on: the quickest way to get a raise in this business is to leave your job and move on to a different job. Poaching is widespread and pernicious.
On the other hand, managers are terrified of losing people. Hiring well is hard,and losing an employee means losing whatever institutional memory they had built up before they left. Along with the pressure of producing software, they have to know that their developers could flee at any moment. So managers are willing to let some things slide if it means they're able to hang onto their "10X" developers: they'll ignore standards and allow redundant, dead, unrefactored, cut-and-paste, poorly abstracted, globally defined, untyped (or worse, “Any” typed), uncontracted, YAGNI, lacking test coverage code. Managers who have been out of the coding loop too long or who are unsure of their position lack the backbone necessary to tell developers, "Make it better." It’s not enough if the code "passes quality assurance" if QA doesn’t know the ranges each level of abstraction is expected to honor.
But this is the kind of code 10X programmers develop. It's mostly junk: it's held together with baling wire and its interactions exist only as a terrible map hidden away in the developer's brain. It only becomes useful after 10 other developers have cleaned up all its rough edges and applied its cruft to more enviroments than the 10X guy's laptop.
But because that code does what the spec says it should do, provided the "just right" environment and the "just right" amount of babysitting, upper management thinks he's a genius and his line managers are terrified that he might leave. Everyone seems to think the 10 people actually making his code saleable are overhead.
It’s not enough if the code "sells well" in its first few months if future maintainers can’t read what’s later presented to them– especially after the original developer has left company. It’s not enough to have a VCS (Version Control System) if the manager doesn’t have or won’t enforce standards of communication and etiquette in commit messages, code review requests, or code review responses.
The problem is ubiquitous, and it's exacerbated by the external realities of the peripheral price spirals caused by this environment: the insane housing prices in SF and Seattle create an awareness in the developers that the grass may be greener elsewhere, that affording that next residence or next toy is just a job hop away.
There is no job loyalty, sadly. The closest companies can do is offer stock options, in a golden handcuffs pattern that keeps only the most dedicated, or most desperate, or least ambitious. And keep re-offering them to valuable employees. (True story: my tenure at Isilon ended in 2008 with the mass layoffs of the recession and Isilon's buyout by EMC. In March 2009 my Palm Pilot, which had been silently sitting in its cradle for years, beeped suddenly. Curious, I read the message: Your last options award from Isilon has matured. Submit your resignation. A little late, but I had cashed everything I could already.)
But if companies want to stop spinning their wheels, they need to get things right the first time. Yes, that means slow down. Yes, that means, plan ahead. But most important of all, have a spine. A culture of excellence requires a culture of courage.