Documentation via automation

There are lots of benefits to automating common, recurring tasks like builds and deployments. We gain reliable, repeatable results and remove the cost of duplicated effort. However I’ve just come across a related benefit that makes it worthwhile considering automation for less common tasks, and that’s as a form of reliable documentation.

I’m currently battling some driver signing issues. We have some incomplete documentation from a previous occasion we’ve been through a related problem, but no one remembers the exact steps used. Because this previous occasion was reasonably considered a one-off, it was never automated. If it had been, it would now provide reliable, repeatable, unambiguously documented steps for getting me out of my current jam. Even if not an exact match for my current requirements, having a working example I could use as a basis to work from would be invaluable.

This has made me think that it is probably worth automating a whole bunch of tasks I hadn’t previously considered due to their infrequent nature. What better documentation of a procedure than working, executable steps? Sure, there may be a need for accompanying rationale, but given a blind choice between a Word/wiki document and something that actually runs and works, I’m picking the latter.