Fiat Lux!

The Software of Economics and "Logic Smells"

I sometimes write about the economics of software development because it's an important thing for software developers to understand, but due to a recent post here, I've decided to write about the reverse. No, I'm not talking about economics software, but rather, the lessons that software development can bring to economics.



pleiade37 posted about how more economically "free" countries tend to give larger sums (as a percentage of GNP) to charity, just as conservatives allegedly give more than liberals. I pointed out that in countries providing a greater safety net, there's less of a need for individual charity. The UK, for example, due to government action, has less homelessness than in the US and, of course, has universal health care. Some anonymous individual posted a rebuttal that reads like a set of far-right Republican talking points (actually, some of it struck me as mouthing the beliefs of the Austrian School of economics, but I digress). While I was rather amused by the comments, what finally made the entire curious rebuttal make sense was the following line:

Moreover, governments worldwide demonstrate they never do anything efficiently, so why would anyone replace an effective private system with a government-run one that will cost more to do less good?

In comes software development.

If you're a good software developer, you're probably aware of something called a "code smell". This is a sign that there might be a problem with the code. For example, in something called "object oriented code", excessive use of if/else blocks is a "code smell". It means that the original developer may not have thought too clearly about what their code was doing (never mind the exact terms, just remember "code smell").

In economic and political arguments, I've learned to pick up on a variety of "logic smells" which tend to indicate a flaw. A key one is when someone uses words like "always", "never", and so on, brooking no room for exception. This doesn't mean the argument is wrong -- few would contradict the assertion that you should never kick a sleeping rottweiler -- but it does mean that you should tread carefully.

The assertion that "governments worldwide demonstrate they never do anything efficiently" is the logic smell in question and, in fact, it fails the smell test dramatically.

First, could someone please define "efficiently" and how it's used in this context? Economics is about the efficient allocation of scarce resources and the history of economics is about people debating what "efficiency" means. Simply assuming what one is trying to prove is a logical fallacy. They key disagreement is whether efficiency for the individual or efficiency for the society is more important. And where does "fairness" fit in? There tends to be an inverse relationship between efficiency and fairness, but that's another story.

In this case, let's consider the US interstate highway system. It's been a huge boon for the US economically and has helped to transform our way of life. Private companies had no incentive to build this because they either could not afford to or they could not guarantee their profits. The rural electrification program is another example. In the US, it means that many far-flung areas have electricity that the private sector would not have provided because it wasn't cost-effective in their five-year plan Harvard business school logic. However, rural electrification and the interstate highway systems have contributed greatly to the US infrastructure and thus the economy. Would you really want private companies ignoring infrastructure in less profitable areas because they can't see an immediate return on investment?

Long-term planning is one of the areas that you may feel the government does a poor job of, but the private sector does no job of, so what does "efficiency" mean here? Of course, we could talk about the military, police departments, fire departments, or health care. In the latter case, every major non-US industrialized nation has some form of universal health care available (and much of it's not "socialist") and they all have far lower health care expenditures than the US, along with remarkably good levels of health care. Of course, the anonymous poster who disagreed with me covers this latter point:

Contrary to popular belief, in the USA too, free medical care is available to anyone that is in need. The drawn-out argument that just occurred in our presidential debates was about making subsidized health care available to families who make too much money to qualify for the free care.

I happen to know several people who read my blog who've suffered due to the lack of adequate health care. It's their choice to speak up, lest I invade their privacy, so I'll talk about my experience. Note that my experience is not unique in the annals of US health care.

I used to have a cholesteatoma in my right ear. The surgery, while simple, was nonetheless expensive. I couldn't afford it. I had smelly pus draining from my ear and no medical programs would cover me. Here's a brief description (from the above link) of some of the dangers:

An ear cholesteatoma can be dangerous and should never be ignored. Bone erosion can cause the infection to spread into the surrounding areas, including the inner ear and brain. If untreated, deafness, brain abscess, meningitis, and, rarely, death can occur.

I lost the bones in my right ear and consequently was deaf in the same ear (and I have hearing loss in my left). Not only did I have pus draining from my ear day and night, but I was at risk of catching meningitis and possibly dying.

As it turns out, Washington State, where I lived, offered a program to help me. All my wife (yes, I used to be married) and I had to do was give up part of our income every month for three months. The amount the state said we could keep would not cover our rent or food. Water, electric and sewage? Forget it. Transportation costs to and from work? Forget it. Money for emergencies? Forget it. Don't even think about entertainment expenses. So we could pay rent, starve, have our utilities shut off, not be able to get to work and be forced to stay at home for three months. We couldn't do it.

Eventually I was forced to look for a job that offered medical insurance. I was an unskilled laborer. Jobs which offered this insurance weren't readily available. And as a skinny, sickly asthmatic, many labor jobs weren't feasible. I had thought about robbing a bank at one point (not too seriously). Sure, life would be over, but as a prisoner, I'd get the surgery for free. I could join the military, but a couple of years prior, they turned me down "until your ear infection gets treated". I eventually took a job as a car salesman.

And then had to wait a year for the "pre-existing condition" clause to be done. When I finally got the surgery, the bits that the insurance company wouldn't pay were still so large that my wife and I gave up and declared bankruptcy.

So we were two poor, hard-working, law-abiding Americans and I couldn't get medical treatment for a life-threatening condition that forced me to quit a job and left me deaf in one ear (I've since had reconstructive surgery and have regained part of my hearing). I couldn't even go to an emergency room because it wasn't immediately life threatening, but by the time it got to that point, it would be too late. So I offer a heartfelt "fuck you" to anyone who thinks that "free medical care is available to anyone that is in need". Believe me, I was facing death. I tried.

And this brings us back to the next point from software development, but I'll be a moment before I get there.

It seems that the extremist views in economics today are the "government can do it all" and "business can do it all" points of view. In the future, laissez-faire fanatics will be looked on as romantic idealists in the same way that many look upon communists today. The problem is the "one size fits all" mentality (that's another "logic smell").

So in economics, we have camps in the two extremes of business and government (never mind the people. Who cares about them?) and the camps sometimes argue that their side trumps all. In software, we often talk about the four main types of programming: functional, logical, objective and procedural. Each has its place, but there are still software developers -- many who are quite savvy -- who argue that theirs is the "one true way". I still hear people tell me that imperative will solve everything, but then hand them this logic problem that Einstein was allegedly fond of and you discover that logic programming tends to be superb for this work. I'd like to see a clear imperative solution for that. Ironically, logic programming often struggles with "logical" representation of math, so functional or other techniques are often incorporated into logic programs to deal with this.

Just as programmers make the "one size fits all" mistake quite frequently, so too do political and economic thinkers. Finland does quite well with their heavily socialist society and Hong Kong does well with their heavily laissez-faire society. They do well due to different circumstances and different value systems of their residents. In fact, there are no pure socialist or laissez-faire economies that I'm aware of. It's always a mixture, but that's only because the real world often intrudes into our economic fantasies.

Naturally, I don't believe that the government should run everything. Do you really want the government controlling all media? Of course not. And I don't know of anyone who would argue that the US should abandon their military in favor of a private defense force. But why should there be any business or government? Why not just people doing stuff? Because software is not about objects or functions. It's about real-world problems that need to be solved and you need some abstractions to solve them (anyone reading this still programming in ones and zeroes? I didn't think so). But the real world, just like the computer world, needs different abstractions for different problems and buying into any extremist dogma is to forget that.