Error messages and defensive programming

So here it is. I’m a geek! There, it’s out, you can all start jeering me and calling me a spod and asking where my sandals are, or, at the very least, call me up asking why your screen has turned a nice shade of purple.

This therefore might not make complete sense to all of you.

The other day at work I did a software upgrade on a test system. Once the main upgrade was complete it was supposed to automatically go round and upgrade some components on some remote systems. Because I don’t trust this process I was logged on to the remote server and watched it happen. And I watched it fail. The process just stopped without doing what it was supposed to do. I then tried to do the upgrade on the remote system manually and that failed too.

I logged the fault with my software supplier and today they came back to me to say that it had initially failed because a disk was full, and that when I manually tried to re-run it, it failed again because a file was locked.

So, we pay thousands of pounds for this software and they people that develop it can’t even write:

$SUCCESS=open($FILE)
if (not $SUCCESS)
then
log_error(“An error occurred while opening $FILE”)
end if

Admittedly an error like this was written to a (very large and mostly indecipherable) log file, but did it not occur to them that this might be something that the user might like to know about?

I despair sometimes.