Yes, That Is a Thermometer on a Dog Leash, but It Works Great!

Ignore the kissing dachshunds on the shelf above for one minute (if you can).

 

Thermometer on a Leash

Thermometer on a Leash

This scene unfolded at my parents house this past weekend. We were gathered for Super Bowl Sunday, and I was making chicken wings. I’m pretty serious about my chicken wings, so I’ve done more than casual study on the subject of how best to fry them. Here is the best article I’m found on the subject so far:

TL;DR: Fry them twice, once for 15 minutes on 250 then again (after cooling them significantly) for about 5 minutes on 350.

The reason for the setup should be obvious: I didn’t have the proper thermometer. What I DID have was my mom’s candy thermometer…but that wasn’t going to work.
First off, it is designed to be used in more shallow vessels and had (emphasis on had) a clip to secure it to the inside of the pot. Here’s a closer look at the thermometer:
An ancient candy thermometer

An ancient candy thermometer

The trouble is that the clip would pin it to the side of the pot and measure the wrong temperature e.g. the pot’s rather than the oil’s.
After removing the clip, I needed a way to suspend the tip on the thermometer in the hot oil. I got the idea that I could cut string to length, tie it to the thermometer, then dangle this new apparatus into the oil. Simple!
I couldn’t find any string, so I used the next available thing…a dog leash which I had to type to the thermometer.
Next, in order to do the dangling part, I had to find something directly above the pot, but there was nothing. Several ridiculous options “floated” through my mind e.g. pulley system, screw hook in the ceiling, even a quad copter. Before I made a REALLY dumb decision on one of these ideas, I noticed the microwave door and thought, “Hey, I could tie the dog leach to the door handle and open it slightly to position the dangling thermometer over the oil!
This proved to be more delicate than I anticipated. Not only did I have to get the swing of the door just right to get the thermometer in the center of pot, I had to fiddle with wrapping the overly long dog leash over itself several times before I got the height just right!

The worst thing was about this setup was…It worked beautifully!

True, there may have been a stray dog hair or two that made it into the fry. Yes, yes no one could use the microwave for 4 hours. Verily, verily the 2nd degree grease splatter burns I got from turning the thermometer by hand to take readings were a tad excruciating for a bit.
Besides the painful welts, annoying all those needing to warm up their coffee, and creating a minor health hazard, I produced some of the more succulent wings my family there had ever tasted.

Have you ever written software like this?

It does something very well, but it is unreliable in it’s performance or fails to handle exceptional circumstances with grace. Maybe, users sing it’s praises (at least, for now), yet defects keep cropping up that eat away at the time you get to spend discovering business value and realizing it through software. Though you may get pats on the back, promotions, or win other incentives, maintaining that code base is painful each and every time a developer new to the code sits down to contribute her piece.

The worst part about applications this is that they work beautifully…until they don’t.

When the shoe drops, someone catches it. Maybe that person has been you at some point. You have assumed the technical debt and incomplete software created by others who have already received their payoff for services rendered leaving you playing a frantic game of pass the buck. I’m reminded of the “Squirrel Burger” story at this point, but that’s another post for another day.
There is no easy out should you find yourself to be the developer tasked with maintaining such a code base.

To preserve your sanity, train and educate yourself.

Consider the following activities aimed at strengthening your technical prowess and building your argument for better development practices.
  • Learn how to skillfully break apart and test tightly packed, untestable classes and methods. Michael Feather’s “Working Effectively with Legacy Code” would be a good place to start.
  • Experiment with CI build services like Travis or TFS’s CI build definitions with which you can automate tests and check code in often and with confidence.
  • Start contributing to a user group of some kind. P.S. your needy questions contribute just as much as expert replies at time ;). I like this LinkedIn group for your internet user group fix and this meetup if you are local to Tulsa
  • Code, code, code. Find ways to code. Code even when you don’t feel like it.
  • Read, read, read. Find and follow the men and women who passionately make the case for the good practices you are convinced need to be adopted in your organization and in your software project.
As you shut down your browser and step back into that soul-suck of a code base, remember these words by Søren Kierkegaard:

To dare is to lose one’s footing momentarily. Not to dare is to lose oneself.

Good luck out there, and good hunting! (SO SAY WE ALL!)

jknight

Jason is a developer, Scrum Master, writer, teacher, coach, husband, father, and community leader out of Tulsa Oklahoma. He's been delivering software since 2007 and absolutely loves the values and principles of agility especially as given form by the Scrum framework.