Wandering Thoughts archives

2005-06-28

Scripting and automation capture knowledge

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.

sysadmin/ScriptsRemember written at 23:48:01; Add Comment

By day for June 2005: 11 12 14 16 17 18 20 21 22 23 24 26 27 28 29; after June.

Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.