Skip to content

The A.M.B. Principle

  • by

I’ve been working on a side project when I get small moments of spare time which involves a lot of programming. I like writing code and as this is a web app I’m coding in PHP with a MySQL database.

When I went to visit the wife in rehab the other day, a thunderstorm rolled through the area. I’d left my computer on, but in sleep mode. As it turns out, the power went off and my computer didn’t shut down properly.

When I got home I found out the power had gone out by the fact that all the digital locks in the house were off by several hours. After resetting the clocks I booted up the computer and went back to writing code. Only I couldn’t get the code to connect to the MySQL database. The improper shutdown pooched all the MySQL databases!

I had to spend about an hour today getting the dev environment uninstalled, reinstalled and restoring the databases.

Which brings us to the A.M.B. Principle. As you might have already guessed, A.M.B. stands for

Always. Make. Backups.

There is nothing worse than working on a web app for several hours and losing all your work because of something silly like a power outage. I make copies of my work usually on a daily basis but not always. I didn’t lose much work from the power outage but I hadn’t backed up that day’s efforts since I wasn’t finished yet. If I hadn’t backed up my databases I’d be well and truly pooched as the amount of test data I have for different test scenarios is fairly substantial. Being able to restore the database from a previous version really saved my bacon on this project.

I really need to get a Uninterruptable Power Supply (UPS) hooked up. It’s a battery that you plug your computer into and if the power goes out, your computer doesn’t shut down from loss of power, giving you the chance to shut it down properly. I’ve got one but it is in a box somewhere waiting to be unpacked.

If you have any digital projects you’re working on my Hordeling, heed my advice and make backups now. Then keep making them regularly going forward. Your future self will thank you.

If you’d like to support my efforts, why not buy me a chocolate chip cookie through my Ko-Fi page? https://ko-fi.com/jhusum

Leave a Reply

Your email address will not be published. Required fields are marked *