Coding == Laundry in the Cold

Yesterday, I had a very productive day—meaning, I was able to code and do laundry.  As I was going about these tasks, I realized that doing laundry at my house is an excellent analogy for coding.

You see, I’m living in a small cabin in the middle of the snow, which includes a washer/dryer unit…only it is outside. It also happens to be incredibly tempermental.  Here’s what I mean.

Problem 1 of laundry:

You have to yank open the doors.  These are ginormous doors made completely out of wooden planks.  They are constructed in such a way that makes them nearly impossible to open.  If the wood underneath has warped or there is snow or ice blocking the doors, it makes it exponentially worse.  So you pull and pull, and sweat and sweat until you get those doors open.

Why this is like coding:

In order to set the platform for your code, you have to work incredibly hard.  You may sweat and sweat over something that has no visible output, but is essential to your later code.  Once you’re done with that…you can finally begin.

Problem 2 of laundry:

You have to load the machine, start it, and hope that it doesn’t leak water.  Yes, this has happened multiple times.  We finally figured out that it behaves this way when laundry is attempted in sub-zero temperatures.

Why this is like coding:

Sometimes, you encounter an awful bug on your code that stops you from doing anything else aside from finding that bug.  You try many fixes, but it turns out you forgot to add a conditional statement very early on.  Essentially, until you fixed it, the code was trying to run in freezing temperatures.

Problem 3 of laundry:

You open the machine to move your clothes to the dryer, but you realize the spin cycle never initiated.  Your clothes are swimming in water.  You nearly get frostbite trying to wring out all your clothes enough to put into the dryer.  Your roommate is alarmed by the subsequent clanking of the dryer.  Perhaps wringing out the clothes was not the best solution.  She insists instead that you put your clothes in their portable washer that they just have lying around (since when??) to complete the spin cycle.  You do so as you try to massage warmth into your lifeless hands.

How this is like coding:

When you have a wet-clothes situation (aka a bug), you have to find a solution to work around it.  Sometimes, you come up with solutions like “I’m going to take out each item of clothing individually with my glove-less hands, wring the freezing water out of it, then place it into the dryer.”  So you do, and you suffer for it.  Then, somebody else comes along who sees an obvious solution that you didn’t even know existed.  They have you implement it, and you seethe inside because all your pain was for naught.  Plus, did I mention how much time this takes?

Problem 4 of laundry:

The dryer works most of the time, but you never know when your clothes will be done.  This makes it necessary to go outside and check to see if the clothes are dry every so often.  Even with this precaution, you still end up with a few items that are slightly damp.

How this is like coding:

You test, test and test your code until it is finally working! You think you’re done, but later on, you still encounter bugs.

On the plus side, I do have clean clothes now!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s