I can't help looking at this and working out how to build a tool that can generate a Do Nothing script straight from your histfile, making the business of archiving the commands you just executed as easy as possible too...
If you're about to do a sequence of commands into a terminal, you can create a transcript with the 'script $filename' command ('script' command is in the util-linux package', according to the man page), and it will capture input/output into the transcript. This would probably make this task easier, since you could see the output data, and how the output data is transformed into arguments into the next command ...
Do-nothing scripting: the key to gradual automation
61–70 of 126 posts
Re: Do-nothing scripting: the key to gradual automation
#62I'd go farther... you can have steps that literally "do nothing". They can be comments, or simple echo statements. They're placeholders to remember to write the code for that step later. This is particularly important when you need to deal with integration that isn't necessarily easy - handling auth credential safely, making sure it works in your pipeline, etc. But all this gets back to something I used to say a lot,…
But these steps already do nothing except say echo what should be done. How does that differ from your "literally do nothing" steps?
Re: Do-nothing scripting: the key to gradual automation
#63What is the value of this over a checklist?
The difference is that it's a more gradual entry to automate the task.
One could, for example, replace any item with a script/program invocation, while leaving the others untouched. It's an intelligent, piecemeal step towards automation.
I would also add that in really critical tasks, one could automate _either_ the item, or it's verification. Sometimes it's easier to check that something is correct than to do it-- or vice-versa.
Re: Do-nothing scripting: the key to gradual automation
#64Re: Do-nothing scripting: the key to gradual automation
#65Re: Do-nothing scripting: the key to gradual automation
#66Re: Do-nothing scripting: the key to gradual automation
#67Re: Do-nothing scripting: the key to gradual automation
#68I know this isn’t the point of the article but the code shown there is the archetypal case where writing classes is an anti-pattern, as argued in “Stop Writing Classes” [1]. All the classes in that code can — should! — be functions. There’s no downside, and it’s less code (and otherwise identical). [1] https://news.ycombinator.com/item?id=3717715
Re: Do-nothing scripting: the key to gradual automation
#69I mention this because I worked at a company where checklists were typically simply added to a wiki and required separate processes for things like peer review.
Re: Do-nothing scripting: the key to gradual automation
#70I know this isn’t the point of the article but the code shown there is the archetypal case where writing classes is an anti-pattern, as argued in “Stop Writing Classes” [1]. All the classes in that code can — should! — be functions. There’s no downside, and it’s less code (and otherwise identical). [1] https://news.ycombinator.com/item?id=3717715
Moreover, the steps should be in a table, with just one function to process the contents of the table.