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 ###
### THIS CODE IS NOT LIVE! YOU ARE ALMOST CERTAINLY NOT EDITING THE FILE
### YOU THINK YOU ARE EDITING!
### 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:
- Make a change to the code.
- Test the changes.
- Realise that nothing appears to have changed.
- Eyeball the code to make sure that you haven’t typed something stupid.
- Satisfied that everything looks like it should work, add some debugging tests to try and pinpoint the point where things fail.
- Reload the page, and realise that you still have no idea why this isn’t working.
- 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.
- Swear at the computer as the code behaves as planned.
- Then realise that the code you’ve been looking at is not the code that the webserver is using.
- 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.