Saving Time Through Automation

Recently I ran across a nice post from Joey D’Antoni about not installing SQL Server from the GUI. It’s a good post, and it reminds me that I should be using this technique each time I build a new VM, but what really struck me was the cartoon from XKCD he linked in. Here it is:

When I look at the cartoon, it seems that it’s easy to waste a lot of time on repetitive tasks. And it is. This is one of the great pet peeves of programmers who look to automate tasks so that they don’t have to worry about repeating them. The power of computers is in repeating instructions over and over again, something that humans struggle with. We make mistakes, we get bored, and this isn’t a good use of our time.

However the cartoon distorts things a bit since the time lost is across 5 years. I don’t know how many tasks I have that take 5 seconds, but I do have some 30s tasks, and certainly a few that take a couple minutes. Even if I do them daily, that means if I automate them in less than a day, I’ve saved time. However, some of my automated tasks still require me to spend some time on them, so my savings aren’t always realized.

That doesn’t mean they aren’t worth automated in some way. I work on an Excel sheet almost daily, and each time I do, I change dates, which takes 10-15s to do. I spent about 5 minutes automating this, so I save time, but more importantly, I reduce tedium and stress, and that can be one of the best reasons to automate. Those simple tasks we dread might be the best items to automate. Of course, keep things simple, since you have to support your automation over time.

There are also the tasks that are better handled through automation. Many of us know that checking to see if all our SQL Agent jobs succeeded or if there are any errors in log files is something best handled through automation. Those simple tasks that many of us may consider part of our jobs are items that are easily automated, and more importantly, if those are the only tasks we perform, it’s entirely possible we’ll be considered redundant and obsolete over time.

I would urge you to learn to automate those pieces of your job you do regularly. Use Powershell, T-SQL, Agent, whatever, but make your job  less stressful and less tedious. It’s good for your career, for your job retention, and it’s fun. Besides, I’ve never run out of work, so removing tedium from my job hasn’t resulted in me being less valuable as a DBA or developer.

Steve Jones

The Voice of the DBA Podcast

Listen to the MP3 Audio ( 3.6MB) podcast or subscribe to the feed at iTunes and LibSyn.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Editorial and tagged . Bookmark the permalink.