Earlier quoted context omitted.
maybe he was a Java programmer? all joking aside, the reason he's doing classes seems to be an intention towards making a FooStep (and/or a BarStep) which could then maybe handle generic Foo stuff (authentication comes to mind) in the future?
"maybe"..."in the future" is the root of much object oriented evil
Do-nothing scripting: the key to gradual automation
81–90 of 126 posts
Re: Do-nothing scripting: the key to gradual automation
#82Earlier quoted context omitted.
"maybe"..."in the future" is the root of much object oriented evil
Well... that is certainly correct in 99.99% of cases. But does it really apply when you write a "Do Nothing Script"(!) with the intention of automating the steps later? If you follow the "rules" to the end you just end up deleting the file after writing it, because it has no effect.
Re: Do-nothing scripting: the key to gradual automation
#83Earlier quoted context omitted.
You can do automation incrementally, but it's quite a different mindset to automate computer than to write a checklist for humans. If you try to emulate a person with a checklist, then you will often find it is actually harder to automate, because the steps often rely on human adaptability and common sense.
What other approach do you suggest, then, in the extremely common scenario where you have an existing, tedious yet reliable multi-step manual process, and you’d like to automate it?
The second thing I would do would be to make sure that the automation happens in a "clean" environment, or at least, there is a clear boundary. Humans can adapt to changing conditions and have no issues to adapt the checklists where circumstances are a bit different.
IMHO the key part to creating automation is to make sure you operate in environment that you can fully control. You can avoid a lot of trouble with emulating the decisions that humans need to take if you just create environment where the machine doesn't have to make the decisions.
Re: Do-nothing scripting: the key to gradual automation
#84Doing manual steps sucks, wouldn't it be great if this was automated for the next person? Be the change you want to see in the world.
Re: Do-nothing scripting: the key to gradual automation
#85Combined with the concept of literate programming this would also help capture the "why"s of the slog, resulting in inline documentation. Jupyter and org-mode for the win!
The big advantage is someone else can pick up from where you started.
And reporting is built in as you can save the notebook and review it later.
The only thing it lacks is control flow. A good operations script has exit points: if an operation fails, you often want to rollback and abort. Though even there, you can save state in a variable and have a check.
Re: Do-nothing scripting: the key to gradual automation
#86I 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
maybe he was a Java programmer? all joking aside, the reason he's doing classes seems to be an intention towards making a FooStep (and/or a BarStep) which could then maybe handle generic Foo stuff (authentication comes to mind) in the future?
Re: Do-nothing scripting: the key to gradual automation
#87Earlier quoted context omitted.
also they allow you to gradually script stuff as you figure it out.
This should be read in conjunction with this other great article about how to gradually automate your process: https://queue.acm.org/detail.cfm?id=3197520
Re: Do-nothing scripting: the key to gradual automation
#88Are there any good slack plugins out there that can do this kind of workflow/ state management?
What benefits would that give?
Re: Do-nothing scripting: the key to gradual automation
#89I 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
Whether or not the author was a Java programmer shouldn't matter - I think one should try to writing idiomatic code in any language, unless there are reasonable reasons against it.