Why software is hard (Part 1 of 10,000)
The other day one of my coworkers made a really profound statement. It went a little something like this. “All software is crap. The sooner you realize that, the better off you’ll be.” I think I know what he means by that. Almost all software seems slower, harder to use, and buggier then it seems it should be… including the software that I’ve written. The truth is writing good software is really hard.
The other day, while carpooling home from work, my friend and I had an interesting conversation on one of the many aspects of software that make it so difficult. Software, by its very definition, is not flexible. People are. We have a general set of “rules” that govern our day to day decision making. Those rules make the general cases of our decision making pretty straight forward. For example, if the light is red we stop and if it’s green we go. However there are billions of exceptions to that rule. If the light is green, but there’s a semi stopped in the middle of the intersection, we don’t go. Some of these scenarios are pretty straight forward. We’ve run into them thousands of times, and we know how to react. But, what if the light is green and there’s a semi stopped in the middle of the intersection and there’s a herd of charging elephants bearing down behind you? Ok, maybe not likely, but the point is that there are lots of scenarios that come up in every day life that we have no plan for. In fact, we likely wouldn’t ever have a plan until the scenario came up. In essence, we decide how to react when the situation occurs.
In software we call these scenarios “edge cases” and we do our best to code for them. The problem is that many times there isn’t a way to allow users to “decide how to react when the situation occurs”. All those options need to be programmed into the software before it’s released.
I see this a lot in business software. In business, you do what you need to do to make the customer happy (especially if it’s a big enough customer). It’s not uncommon to bend the rules to meet customer’s needs. In fact, it’s not at all uncommon to have the rules change from day to day depending on the customer, the market, and what the sales person had for breakfast that morning. Today there may be zero exceptions to the “Net 30” terms. Tomorrow the biggest account might be told “Net 593” is no problem.
The point is that business (and life in general) is very flexible. We have general rules that we follow, but we also are free to change many of those rules as necessary in order to navigate the complex systems in which we live. Software on the other hand is ridged. Software is true or false. Software does this or it does that. Software is not flexible. We try our best as programmers to make it as flexible as possible, but inevitably at some point a user will need it to work in a way that is contrary to the rules. And what does the user say when that happens? “This software sucks!”