Software Development as a Christmas Story
Tags: code, development, programming, christmas
Published: 2018-12-21 10:09:28

---
title: Software Development as a Christmas Story
published: true
tags: code,development,programming,christmas
canonical_url: https://craignicol.wordpress.com/2018/12/21/software-development-as-a-christmas-story/
---

<dl id="attachment_3498" style="width:168px;">
<dt><img data-attachment-id="3498" data-permalink="https://craignicol.wordpress.com/dsc_0118/" data-orig-file="https://craignicol.files.wordpress.com/2018/12/DSC_0118.jpg" data-orig-size="3088,5504" data-comments-opened="1" data-image-meta='{"aperture":"2","credit":"","camera":"G8441","caption":"","created_timestamp":"1545314886","copyright":"","focal_length":"4.4","iso":"800","shutter_speed":"0.03125","title":"","orientation":"1"}' data-image-title="DSC_0118.JPG" data-image-description="&lt;p&gt;Gingerbread Christmas Tree&lt;/p&gt;
" data-medium-file="https://craignicol.files.wordpress.com/2018/12/DSC_0118.jpg?w=168&amp;h=300" data-large-file="https://craignicol.files.wordpress.com/2018/12/DSC_0118.jpg?w=575" src="https://craignicol.files.wordpress.com/2018/12/DSC_0118.jpg?w=168&amp;h=300" alt="Gingerbread Christmas Tree" width="168" height="300" srcset="https://craignicol.files.wordpress.com/2018/12/DSC_0118.jpg?w=168&amp;h=300 168w, https://craignicol.files.wordpress.com/2018/12/DSC_0118.jpg?w=336&amp;h=600 336w, https://craignicol.files.wordpress.com/2018/12/DSC_0118.jpg?w=84&amp;h=150 84w" sizes="(max-width: 168px) 100vw, 168px"></dt>
<dd>Oh Tanenbaum</dd>
</dl>

We decorated the house for Christmas. A smaller project than most of the software I’ve worked on, but a useful reflection.

## The Cost of context switching

Sometimes, in the middle of one task, you need to do another. Either because you were interrupted, or because you weren’t prepared. Consider the tree, a tall tree, one you need a ladder to decorate. But you left the ![🌟](https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f31f.png) in the attic.

You don’t just have the cost of picking up the star, you need to get down the ladder, fold it up, carry it upstairs, open the attic, unfold the ladder, climb to the attic, find the star, then pick it up and unwind all the other steps just to get back where you stated before you can continue the task of putting the Star on the tree.

It’s _just_ a minute to get the star…

## Yak shaving

Sometimes it’s more than just one thing. Sometimes to get to where you need to go, [there’s a cascade of other tasks](https://craignicol.wordpress.com/2017/01/13/not-the-lazy-programmer/).

You want to put the tree up, but it’s the first time you’ve had a real tree, so you need a new base. It’s bigger than last year’s tree, so your lights don’t fit. So you need to go to the shops. But you need to fill up your car. And the tyre pressure warning light comes on so you need to top them up. And you need to check the tread depth whilst you’re there, and so on.

> ![Programming in a nutshell](//imgur.com/D0daEJW)

## Performance at scale

Our tree stood up fine when it was delivered. But as it scaled out and the branches widened, it pushed against the wall, making it unstable in the condensed space. It fell over.

Luckily no lights or baubles were using it at the time, but it’s an interesting challenge holding up a heavy tree in one hand, trying to adjust it’s position with the other hand, as I avoided the puddles of water in the floor as my wife mopped them up. If you’ve ever worked support, this may sound familiar.

Turns out that it was harder to stabilise than I anticipated.

The branches were unevenly partitioned, providing more load on one side, so I had to stabilise it against the wall. And the tree was almost a foot taller than expected, which turned it out to be 2 foot taller than the base was rated for.

We upgraded the base to handle the load. It’s bigger than we need.

## Technical debt

I have some old pre-LED tree lights and they slowly fail so each year I replace the unlit ones from the packet of spares but I haven’t been replacing the spares. Eventually, they will run out, and the spares will no longer be available. I’ll have to throw them all out and start again.

The new led ones don’t let me replace them individually. But they last longer and are cheaper to run.

Which debt is easier to live with?

With a big tree, those old lights aren’t long enough. So, do I buy another set for the rest of the tree that doesn’t match them, or throw out the existing ones and buy a longer set? The latter looks better, but throws out the sunk cost along with the lights.

## You know computers, can you look at this for me?

No, I can’t fix your tree. I can navigate a garden centre. I know enough physics to keep a tree upright, eventually, and safely put the angel on, but I’ve no Idea how to grow one, or what that weird stand with 17 gears you bought does, or how to assemble your plastic one. And I’ve no idea what that bug in the tree is.

Merry Christmas. Catch you all in the New Year.