Software and Health Care

February 24th, 2010

Recently, at work I was given the task of improving a piece of software that ran slowly, consumed far to many resources and was far to rigid to perform any more than the single task for which it was originally created. As I began looking into the code, I discovered that worse than all that, the code was an utter mess and there was absolutely no way I could may even the most marginal of improvements without starting from scratch.

So I did. While I worked on recreating one part of the software, a colleague of mine worked on another. Eventually, I finished my parts and got to testing and tuning his parts. As I went, I continually tested my new code and ideas against the existing system to ensure the new product was better than the old one. With little exception, the new product ran at least twice as fast as the old, consumed fewer resources and was flexible enough to handle the original task as well as a wide range of current and future potential tasks. I was pleased.

Then I got to the code my colleague worked on. There didn’t seem to be anything wrong with it on the surface. Given ideal and even the least ideal circumstances we imagined the software might face, it appeared it would run faster than the old code, perhaps even two or three times faster. Yes, we had to admit it would consume much more memory, but the speed improvement would be worth it as the old software was far too slow.

But once I got into testing against the old software (like I did for the parts I worked on) I came to a stunning and all together disappointing realization. First, we were consuming far too many resources which was bringing the hardware to its knees, even more so than the old software did. Second, and far worse, we were running as much as seven to ten times slower.

So what happened? Even in far from ideal circumstances the software should have easily out performed the old software. The answer was simple: circumstances were even farther from ideal than we thought. This made our software (which was smart enough to deal with even the worst case) take much more time and resources dealing with the terrible cases it faced. Unfortunately, this was the standard case and our beautifully crafted software was far from adequate for the task.

So I worked tirelessly (then tiredly) for weeks trying to squeeze the new code my colleague wrote to get the performance out of it that we needed. After all, we couldn’t go back to the old software since it was a nightmare to maintain and too rigid for even current tasks. But finally, I had to admit there was nothing I could do.

Nothing short of rewriting it yet again myself. So I finally threw away the code my colleague wrote and started from scratch for a second time. Carefully considering how the old software did the task, comparing it to the flexibility of how our attempted solution was designed, in the space of just two days, I wrote a solution that not only consumed fewer resources, but ended up running two to three times faster than the old software.

Yay for me, right? Sort of. If it hadn’t been for the original implementation I wouldn’t have known what works well. If it hadn’t been for the second implementation I wouldn’t have known how bad the circumstances were the software faces, and wouldn’t have seen how that can effect performance. While I’d like to claim a stroke of genius here, I pretty much have to say it was the process of elimination: we already did everything that wouldn’t work, then I did what would.

This, it seems to me, is like the Health Care debate/bill in the United States Congress today. Clearly, the current system isn’t working for everyone, and increasingly for anyone. It is slow, cumbersome, expensive and getting more expensive at a rate no one can afford in the long term. The Federal budget already devotes a huge percentage to health care related programs and will continue to have to devote more money to them, else abolish or diminish them. So, President Obama rightly made it his agenda to “fix” it, by asking Congress to create a piece of legislation that would somehow make things better.

There’s probably a lot of good things in the bill Congress eventually came up with. I hear there’s some sort of tax incentive, rules against insurance companies dropping patients when they actually become sick. There’s probably a lot that’s good. However, there’s enough that is – let’s call it “less good” – about the bill that public opinion has turned sharply against it. Some examples of “less good” qualities of the bill include throwing money at states wholesale just to win votes from their senators/representatives.

Does that mean we should keep the current system as is? Absolutely not. Many people still want reform, just not this reform. Like my software system, the original health care system isn’t working like we want and consumes far too many resources. But if the new system is only being approved by a slim margin (if indeed it gets that much) because votes were effectively purchased for it, how much better can we hope it will actually be? Reform yes, for the better? Maybe not.

I don’t expect us (by “us” I mean Congress) to just throw that bill away and let it go to waste. I expect us to start from scratch again, taking lessons learned from the current system as well as the bill and try to make something beautiful. I don’t pretend to know what that bill will look like, but whatever it is, it had better not resort to pork, special interests, or any other means of purchasing votes to get through either house. Health care is far too important a subject for any bill to be voted for or accepted for anything other than its merits.

Comments Off

Comments are closed.