Live data from Hacker News

Do-nothing scripting: the key to gradual automation

blog.danslimmon.com

111–120 of 126 posts

Re: Do-nothing scripting: the key to gradual automation

#111

Why do I think that writing a script in Expect ( https://en.wikipedia.org/wiki/Expect ) would take as long as doing this and then you would be done?

..because you've never tried using expect in anger?

Nope, I like Expect, it's my friend and I'm able to make scripts with it. So, no anger.

Re: Do-nothing scripting: the key to gradual automation

#113
post #43

Earlier quoted context omitted.

"maybe"..."in the future" is the root of much object oriented evil

I don't think there is a correct answer, but I like that a developer has foresight.

Real foresight is understanding the cost of unnecessary technical debt.

Re: Do-nothing scripting: the key to gradual automation

#114

It seems to me that all you want is to document a manual process. Having them documented in dump scripts is no different than having them documented as a guide in your knowledge base .e.g in Confluence or as product requirements. I can see the usage in an isolated team of a few people that will write these scripts for their own benefit. I am opposed in general with having scarce information around. Better have everyt…

I find structure-free knowledge bases like Confluence becoming outdated quickly, lacking forking/merging (other customer has sligtly modified process), lacking enforced peer review (pull requests) or prone to company structural changes (NIH, "let's create new page in our space").

You can keep these scripts versioned in a repository next to the actual product code, with all benefits like forking, merging and pull-request reviews.

Re: Do-nothing scripting: the key to gradual automation

#115
post #95
post #27

We use this at my place, though in bash, and we call it executable documentation. Stuff like: NAME="$1" # Create directory for the code mkdir "$NAME" # Checkout the source cd $NAME && git something # and so on Sometimes with an echo "You need to read and understand this before just using it"; exit 1 thrown in somewhere for good measure. These files will have no logic, and make very little use of variables. They will…

You could prefix the script with `#!/bin/bash -vn` and make it executable. It will just print itself.

Thanks. Didn't know about this.

Re: Do-nothing scripting: the key to gradual automation

#116
post #79
post #60

Earlier quoted context omitted.

But these steps already do nothing except say echo what should be done. How does that differ from your "literally do nothing" steps?

In a truly minimal system, there isn't even a prompt. A code comment is about as minimal as I know how to get. That's just a placeholder to remember to automate a step. When automating a complex manual process, the first thing I do is write comments describing the sequence, and any parameters needed. Parameters in particular can be enlightening, because when manual processes grow organically, naming consistency becom…

Printing means you can run the script as-is, and any bits which aren't done automatically are prompted for. Just putting comments describing the steps would be like writing a README except in a more esoteric format and would defeat the primary benefit of the approach outlined in TFA.

Re: Do-nothing scripting: the key to gradual automation

#117
post #43

Earlier quoted context omitted.

"maybe"..."in the future" is the root of much object oriented evil

I don't think there is a correct answer, but I like that a developer has foresight.

This is a pretty common misconception. I have yet to see a bit of perfect abstraction that has been written before the problem occured.

Re: Do-nothing scripting: the key to gradual automation

#118
post #116
post #79

Earlier quoted context omitted.

In a truly minimal system, there isn't even a prompt. A code comment is about as minimal as I know how to get. That's just a placeholder to remember to automate a step. When automating a complex manual process, the first thing I do is write comments describing the sequence, and any parameters needed. Parameters in particular can be enlightening, because when manual processes grow organically, naming consistency becom…

Printing means you can run the script as-is, and any bits which aren't done automatically are prompted for. Just putting comments describing the steps would be like writing a README except in a more esoteric format and would defeat the primary benefit of the approach outlined in TFA.

It kind of boggles me that a real analysis of the problems with naming conventions in manual process got massively downvoted. But no one ever got rich counting on the analytical sophistication of HN.

I'm not saying the original approach is bad. I'm saying it's not the simplest thing that can possibly work. I'm talking about how to move to automation, not how to reduce errors on the manual process. Both are needed.

Re: Do-nothing scripting: the key to gradual automation

#119

Earlier quoted context omitted.

Yes, very much so. In addition stop using RSA[0] and use ed25519 with `ssh-keygen -t ed25519` [0]: https://blog.trailofbits.com/2019/07/08/fuck-rsa/

Unless you're using a hardware token via gpg-agent. In that case RSA is the only way most of the time.

Yeah hopefully when FIPS 140-3 finishes we'll start seeing hardware tokens that can do elliptic curves.

Re: Do-nothing scripting: the key to gradual automation

#120
post #5

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...

Reminds me of the time I decided to try kanban to start moving forward on tasks I procrastinate on or have trouble starting. Of course, to make sure it was efficient enough to be helpful it had to be a configurable terminal app I could quickly update and review via cli and abundant io flags/options. It also made sense to write it in Scheme because I had been thinking I wanted to try Lisp earlier that day. Fast-forwar…

Lnk src pls
Post reply on HN