2/06/2006

The difference between computers and humans

To many of you, this may seem self-explanatory. And most days, I would agree with you. But today, I have had the exciting opportunity to re-learn this wonderful tidbit of truth: Computers do exactly what you tell them to do. And only what you tell them to do.

Friday I spent the better part of my workday exceedingly frustrated while I attempted to debug what should have been a very easy, very minor change to my code. On Friday, and indeed the bulk of this morning, it was neither very easy nor very minor.

Because I am using something that does not have a nice little editor, I am relegated to code displayed in textpad and printing out things to my html page. This combines to make debugging the most difficult experience possible. Because, you see, there is a corrolary truth tidbit to the one above: People see what they're expecting to see. And only what they're expecting to see.

The end result of this is that while I was printing out the two variables and the result of my compare operation - which was telling me that they were not the same - when my eyes looked at them, they were the same. I saw essentially this:

Variable1 = This-is the-string-you-printed
Variable2 = This-is-the-string-you-printed
These strings are not the same.

Now, if you look closely, you will see the minor little thing that caused the issue. If it takes you less than about 10 hours of work, then you are probably more qualified to be a software engineer than I am.

5 comments:

  1. Gak. BASIC? You poor soul. I loathe BASIC, visual or otherwise.

    It might not have taken me quite so long to find if I hadn't kept getting dragged into meetings and having to essentially restart every time I was about 10 minutes into the debugging process. But it's still a big "DUH" once you see it. *sigh*

    ReplyDelete
  2. ok, i saw it in about 2 minutes, but only b/c you told me to look VERY carefully.

    ReplyDelete
  3. 5 seconds. But I just got back from a week of ASP.NET training with VB.NET.

    ReplyDelete
  4. Anonymous9:06 PM

    Missing hyphen? But again, only because you told me where to look. I can't tell you how many web pages that didn't work for me because of a space. Or a bracket. Or Lord knows what else. This is why I will never be a computer engineer. My method would be to take a baseball bat to the CPU and scream, "Why aren't you working? Why, why, why??"

    I'll stick to writing. :)

    ReplyDelete
  5. I may have to try your method, Michelle. :) Though now I am happily back using C# with a nice little debugger that let's me step through things. Ahh. Not sure why that makes it so much easier but, there you have it.

    ReplyDelete