Scripting and automation capture knowledge

June 28, 2005

NewsForge has been running a series of articles by Brian Warshawsky on the 'Ten Commandments of system administration'. His tenth commandment is 'Thou shalt not waste time doing repetitive and mundane tasks' (article here, with links to the other nine), where he tells people to automate such tasks through shell scripts.

There's a number of good reasons to follow this advice; for a start, writing shell scripts is probably less boring than doing these mundane tasks over and over. But there's a slightly inobvious one: scripts document how to do things.

When you perform a task by hand, the knowledge of how to do that task may exist only in your head (which presents certain problems if you want, for example, an undisturbed vacation). When you automate the task through a script, the script itself serves as documentation for how the task is done (maybe not good documentation, but commenting the script can help with that).

Thus, when you automate something you're both getting out of a boring task and creating documentation at the same time. Since both are virtuous sysadmin activities, you're getting a nice two for one deal.

Scripts have an additional, highly useful property as documentation: although they may not be clear or easy to follow, they are guaranteed to be accurate documentation. Given the tendency for much documentation to go out of date at the drop of a hat, this can be very handy.

Written on 28 June 2005.
« Some quick CBL stats
Reconsidering network authentication delays »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Tue Jun 28 23:48:01 2005
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.