This is a stupid simple trick for debugging code. It nearly never fails, and allows you to keep your cool and not lose it when going through your code.

I used to work with a friend that asked me one day to come over to his desk and look at something. He asked me by saying, “Be my cat for a second.”

I looked at him blankly and he said, “Just sit on the desk next to the monitor.”

I most likely replied, “Are you going to paint me like one of your French girls?”

He then proceeded to go through his code, explaining to me how it worked. I just nodded and eventually he found his error and said I could leave.
I now have a picture of a cat at my workstation that is my coding partner. If something doesn’t work. I explain my code to the picture until I find the error.

Your coding cat is anything you want to explain your code to while you’re debugging. The picture attached here is my real life cat, Bacchus. I ask him to help me, but he likes to chew on my monitors and knock things off my desk.

What most people don’t get is how frustrating it is to work on something for hours to have nothing happen, or get a completely unexpected result. Coding and development are not the cut and dried process non-coders think. Do yourself a favor and don’t drive yourself crazy. This stupid little trick will save a little sanity. If you’re working in an office with others it might also make you a little more interesting. Because, let’s face it, you’re a very unstable and boring person who talks to pictures of cats instead of real people.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: