Sunday, October 19, 2008

Computers and Fast Stupidity

I believe it was Scott Adams - creator of Dilbert - that once claimed we are all - every last one of us - stupid. A few minutes ago I refreshed my memory on that point. I am stupid. The loveliness of it in this case is that I used a computer to accomplish my stupidity, and therefore did it very quickly.

I am in the middle of a major set of updates to my website, and a big part of that website is my sculpture gallery. I wrote a program to create that gallery some years ago. Over the past month I'd made a slew of changes to that program, tested them, and was just about done. This morning I thought of one more change I wanted to make, so I started in on it.

That change required me to create a bunch of new files from a template. I created the first file and copied it over into all the other directories where I needed it. It was that copy that did me in. I automated the command and didn't test my automation carefully enough before running it. My 20K script for creating the gallery got written over with a copy of the new, one line, text file.

And before anyone tells me to go out and use some utility to get it back, I live on Linux, not Windows, and the file was overwritten, not simply deleted. The data blocks have been reused.
It's gone for good.

I have a copy of the script from before all my recent changes, at least. That gives me a starting point and saves a lot of time, but I still get to make the changes all over again. That's not even all that hard, really, as I know this stuff pretty well. But it does use time I could have spent on other things.

Oh well. Live and learn - and test carefully before running stupid, four line scripts that copy or delete files!

I'm off to start work on putting things right again.