Friday, February 26, 2010

Why Computer Progamming is Hard

I had a perfect example at work today why working with computers is more difficult than people realize.  It was further enforced by the fact that my friend Rick posted a link on facebook that hit the sums it up perfectly, computers do exactly what you tell them to do.

Think about that for a second.  Whether you realize it or not, human communication is very imprecise.  A lot of what is communicated between people is implicit.  Intent is not something that computers understand.  They only understand the exact instructions you feed them.

Several months ago one of my engineers was told to turn on a feature in the system to run a test.   We had turned it off because the feature was causing some problems but those issues were resolved so the powers that be wanted to turn it back on.  He did exactly what the request asked for, he turned on the feature.  The feature controls whether or not a certain data source is used or not.  There are times when some of our customers explicitly turned it off and under no circumstances should it be turned back on.

But since it was turned on for the purposes of this test, this overrides any configuration that our customers can do.  Nobody thought it would do this because this is not normally what happens when we run tests.  The system is usually set up to avoid these circumstances.  So what was the problem?

The problem was that the feature should not have been turned on.  It should have been set to not be off.  Believe it or not, in this case, the opposite of off is not on.  It is in fact not off (Null for those familiar with computer jargon).  The computer, and the engineer, did the right thing.  The "intent" however was not to just turn it on completely.  The intent was not to specify that it was off completely.  If there were other configurations which said to turn it off, as is the case for some of our customers, those rules should have taken precedence.  Of course they did not because the computer was told to turn it on.

So you see, the problem is not the computer.  It is that we live in a world where things are not always specified precisely.  And that is what makes software development so hard.

1 comment: