Liver Debugging

As I learn to code, there are many times that I just cannot go on. I just cannot solve this error, sometimes for days. Sometimes when I stop to complain to somebody about why the code is not working, I finally understand the problem. By mouthing out loud the problems I was facing, I reached a higher understanding, or considered something I had not yet tried.

If I had a mentor of some sort, I suppose this would not be needed, as at that point I would have a knowledgeable person who can talk through the code with me. But if nobody near you understands code, It ends up being just the nearest friend who will listen. I will complain for hours to my friend James about what I cannot do, only to find out that it helped me find a solution. This is great, as long as you have a person who is willing to listen to nonsense they don’t understand and can’t reciprocate. Most people enjoy conversation, rather than being mindless reservoirs for code-complaints.

The Duck

It turns out that a living person is not even needed. I actually became more knowledgeable about the code i wrote, by explaining out loud what it is supposed to do, then reflecting on what it is actually doing. This has been recognized as an informal term called Rubber duck debugging.

Rubber duck debugging is an informal term used in software engineering for a method of debugging code. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line-by-line, to the duck.

The Liver

Programming and troubleshooting is very stressful, and many of us will find ourselves after work with a drink in hand. What better way to unwind and let go of the many stresses in a developer’s day. However this is not the healthiest solution, especially if you end up feeling hungover the next day and have an even harder time mentally processing your code. It is not the best way to treat your liver.
picture of a rubber liver
What if there was a way to use your liver for good instead of punish it with alcohol. Actually, maybe there’s a way to do both! And with this, i present to you: Liver Debugging!

I have, next to my keyboard, a trusty foam liver (don’t ask me how i obtained this treasure).

The liver can be squished and handled to almost any extent. Sometimes it is just squeezed in my sweaty palm. It takes quite a bit of abuse and is not actually attached to me nor causing me discomfort. It is hoped that i am able to dissipate some frustrations into this foam liver as opposed to damaging my human one.

As the title of this post suggests, it is also useful for explaining code to. “Liver, why isn’t this method loading? I just added it to the class and… wait.. I DIDN’T SAVE THE FILE!”, or “Liver why isn’t… OH, semicolon!”.

As odd as it may seem to witness me taking to my liver, I don’t care. My co-workers don’t care either. Others are able to get their own work done, and I am able to continue working.

The Health

And after work, while I might still do some damage to my human liver, maybe it’s slightly less, due to healthy use of my foam one. Maybe i’m a little less anxious and mad when I get home, because I was able to finish my project without holding others back. Maybe i didn’t need a drink at all because the use of my foam liver stopped me from elevating to high stress levels.

Maybe i’m insane for talking to a foam liver about class inheritance.

But now James doesn’t have to hear it as much and i can be a self sufficient programmer. Now for this, i can appreciate my liver. All in a day’s work.

 

Leave a Reply

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