Finding the cat

Posted by Roie R. Black on Mon 23 September 2013

Cats are cool! They can hide in the strangest places. At least ours can. We have two house kitties, who must live indoors because they have an immune deficiency (FIV - kitty aids) that means they need to stay inside to avoid getting hurt. My wife loses one of our cats on average once per day. I always find them! How I do that is something I try to teach to my students. I thought it might be worth a short blog article, so here goes!

Why is finding a cat so hard?

Snowball

The obvious answer is that they are clever, and find really cool hiding places. Often, those places are in plain sight. Like on the bed above. Most often, they are not in plain sight, though! So finding them does involve searching, and we all know how to do that, right? Well, we think we do!

The way many humans think is more likely the source of the problem. Every time my wife hollers from somewhere in the house that she cannot find Victor, or Snowball, I set off to find the offending cat. My wife will tell me she has looked "everywhere" for the cat, but obviously, that is not so! The cat is in the house. Wherever he is hiding is somewhere that has not been searched yet. Why not!

Student problem solving

My students often come into my office with a problem in a program they are working on. They may well have spent hours pondering the problem, and have no idea where the problem is, so they ask me to find it for them! When I first started teaching, I had to chuckle at what happened next. I would glance at their program for less than a minute, then start to point to the place the problem could be found. The student's eyes would get big, then they would rip the program listing off of my desk and storm out of the office, mad at themselves for not seeing the problem I found so quickly! Why could I do this, and they could not?

Seeing what is really there

The problem the student was having was simple. They had stared at the code for so long, they stopped seeing what was really there. I had not looked at it before, and read what was actually there the first time I looked at it. I looked at every line in the program, not just those that the student was "sure" was where the problem could be found. Whatever the problem was, it usually was easy for me to spot, but only because I actually looked at the entire listing. The student stopped looking closely, because they just "knew" that the problem could not be "there", so they missed the problem. Sure they got mad. It was all I could do not to laugh at how easy this was. It is only easy if you train yourself to be careful not to look past things that are there, right in plain sight!

My solution for finding my own programming problems is to read the code backwards. I take my finger and scan the text backwards, looking at every character on the page (or screen - even if it leaves finger prints on my nice screen). I ask myself if each punctuation mark is needed, and if every word is spelled right. In doing this, I force myself to look at what is really there, skipping nothing! More often than not, I find my own problems this way.

My wife, looking for the cat, does something similar to what the student does when they are looking for the problem in their code. She just "knows" the cat is not in some place, and does not look there. How she knows this, even she does not know. The point is that her technique is missing examining places where the cat might actually be. It is not that she does not try to find the cat, she is doing what she has learned how to do, but her technique is not working.

My solution in this case is almost the same as for the student with the programming problem. Regardless of where my wife might have already looked, I start a systematic sweep of the house, starting in one corner and working my way throughout the entire house. I look everywhere, even those places where the cat could not be (yeah, right! They are clever after all!) In the end, I usually find the cat. In the process, I end up looking into places I seldom ever examine. I have found things I did not even know were missing, in addition to the offending cat!

When I find the cat, my wife is happy. The cat gets a hug, or a treat and goes on with its business. (Actually, they hide so they get the treats!) When I find something else that is lost, I have always faced another problem. Since I found the thing, I obviously must have put it there in the first place. So I am in trouble, even though I found the durn thing. I will leave that problem for another day!

I did find Snowball, he was sleeping under the hassock in the living room.

Comments


There are no comments yet.

Add a Comment

You can use the Markdown syntax to format your comment.

tags: Stories