Testing and Debugging – Cold Eyes are the best eyes
Written on April 23, 2008
Most software engineers are at least a little bit prissy when it comes to talking about ‘bugs’. We’d rather you call them “defects.”
I’d like to say that this isn’t just software engineers being petty and small minded, but it is. Software engineers *are* small minded. We have to be, because, well, we just are. The things we build are too darn big to fit inside our teeny brains.
Software engineers love to give meaningful names to things because meaningful names (and naming conventions) are a very handy crutch for our tiny crippled minds. (I call my brain “Tim”. Whenever I work on boilerplate code I always forsee an empty place in my head where my brain used to be, unless things change)
Calling something a “bug” is not giving it a meaningful name. It conjures up a cute and playful image of a rascal insect frolicking through the code. If things go wrong, it’s not your fault – it’s those darn bugs in the system again. Nothing could be further from the truth. But what’s the right word? When the screen goes blue and starts vomiting hex codes, what are you supposed to call that? What really happened?
What happened was that a software engineer somewhere was not small minded enough and misunderstood what the program he wrote was doing.
To a software engineer, there are only two things that matter: what you want the computer to do, and what the computer actually does. The basic goals of software engineering are understanding the first thing, and matching the second to it. A program is the mapping between the two.
Misunderstanding any one of the desired result, the program or the computer will lead to a defect.
The point of this post is the observation that when a defect occurs, most of the time there’s a fundamental problem of misunderstanding involved. Software Engineers try to avoid shipping products which they know are defect-ridden, which means that when a defect occurs, chances are the author *thought* it was right.
As an author, this is a scary thought, because it means that you didn’t understand what was going on. Scarier still is the realization that you didn’t understand what was going on *and you didn’t realize it*.
The biggest hindrance in locating and fixing defects is shedding your faulty understanding and figuring out what is really happening.
Filed in: technical.