Sometimes, the simplest solutions are the best

August 2nd, 2007 by

I was investigating a bug in the renewal calendar, and I went to our version control system and loaded what I thought was the obvious file to edit.

Then I saw

### WARNING ###
### WARNING ###

and remembered that in this particular instance, I meant to edit a different file.

Had I not left that note for myself and the other programmers in the UK2 team, the consequences would probably have been grisly. The progression typically goes something like this:

  1. Make a change to the code.
  2. Test the changes.
  3. Realise that nothing appears to have changed.
  4. Eyeball the code to make sure that you haven’t typed something stupid.
  5. Satisfied that everything looks like it should work, add some debugging tests to try and pinpoint the point where things fail.
  6. Reload the page, and realise that you still have no idea why this isn’t working.
  7. Grit your teeth, muck about with hidden fields, and generate a URL that you can feed to the debugger, and step through the code line by line, looking for the point where everything goes tits up.
  8. Swear at the computer as the code behaves as planned.
  9. Then realise that the code you’ve been looking at is not the code that the webserver is using.
  10. Curse at the loss of 30 minutes or so of productive energy, and internally vow that your next job will be a contracting job where you can bill that last half hour as “Stress-testing the version control system under development conditions” or some other nonsense.

A colleague of mine at my previous job had a similarly simple solution to a complex problem. We had a number of servers in the office, and a single KVM (keyboard, video and mouse) switch hooked up to them. It was possible to switch the keyboard and monitor independently, which lead to some confusion and mix-ups. (Also the mouse, but these were pretty hard-core Linux servers, so the mouse was pretty much useless.)

The solution was to add a couple of lines of DYMO tape to keyboard and monitor.

Keyboard: “Are you typing where you’re looking?”
Monitor: “Are you looking where you’re typing?”

For similar reasons, a friend of mine from ages ago who was into lucid dreaming, had a card in his wallet that said “Am I dreaming?” The idea was that he’d see it many times per day, and therefore get into the habit of asking himself that question – and eventually he’d ask himself that question when he actually was dreaming. And then, I dunno, start flying, breaking the laws of physics or whatever you do when you’re lucid dreaming.

  • Share this post

Is UK2 Microsoft compatible?

Landing Page Optimisation


# 7th August, 2007

I’m commenting here, because it is such a great post, and you should know it has been read!
So I’m not the only one who sticks bits to keyboard and monitor, thank goodness. Keep up the good work Sam – site is looking good!

# 11th August, 2007

As IanK said; great post.

We have a bunch of machines in our server room connected to a KVM. Nothing like powering off the wrong machine to make you put stickers on the machines with their names on them.

Stickers, notes, all simple.

And don’t forget the mantra;
Nothing is so smiple that it can’t get messed up
smiple is an intentional typo 😉

Leave a Response