Live data from Hacker News

Type in the exact number of machines to proceed

rachelbythebay.com

251–260 of 340 posts

Re: Type in the exact number of machines to proceed

#251
post #65

Earlier quoted context omitted.

Came here for this. A: “Passing control” B: “Taking control” A: “You have control” B: “I have control” This is how I remember it (6174, UH-1Y).

As a fun fact, I was taught a shorter version (during private pilot instruction): "You have the control." "I have the control." IDK if it changes between aircraft types, commercial/private/military cultures, or if it's just coincidence.

Or as we learned from Sully, when you're the captain, and you take charge and responsibility quickly, a simple "My plane" suffices

Re: Type in the exact number of machines to proceed

#252

I've seen this called "pointing and calling" [1], Japan's train drivers use the technique to force themselves to perform actions and take notice of the current environment. I personally took it to heart, it's a good system for forcing a cache miss in the brain - make sure you're on "database production" or "database localhost" etc. [1] https://en.wikipedia.org/wiki/Pointing_and_calling

I try to do that during incidents. I'm not 100% there since it's no a company rule, but it helps me at the time and later when writing up details: "I see ", " should fix it because ", "I'm starting to do now and seeing ...", etc. It also helps when Z results in a total meltdown and you need to pull in more people to help out, so they have context of what happened.

French firefighters do this when arriving at a scene. The first messages sent over the radio will say:

- I am... (who you are and where you are)

- I see... (describe what you see in simple non-ambiguous terms)

- I do... (what action you are taking now)

- I ask... (ask for reinforcements if necessary, you may be asked to justify yourself more)

Re: Type in the exact number of machines to proceed

#253
post #174

Nitpicking > "This might be as simple as printing the number with your locale's version of numerical separators, like "123,456" or "123.456" or "123 456" or whatever else you might use where you are. The trick is then to NOT accept that as input, but instead demand that they remove the separator and jam it in as just digits. " It's easier to just strip non-digit characters than to parse the input for them and respond…

Stripping the non-digit characters would allow "123,456" to validate instead of only accepting "123456" -- which defeats the whole purpose of printing the number with numerical separators (to prevent copy/paste).

If you're worried about copy-paste, make it a random code.

Re: Type in the exact number of machines to proceed

#254
post #62

I have a habit of creating cli tools, which potentially do dangerous things, to default to dry-run mode. For example, instead of the typical `--dry-run` or `-n` option, my scripts instead had a cheesy `--do-it` to be non-dry-run. It is annoying as hell to my colleagues, but saved the day many times.

In PowerShell, this is a native feature of the entire shell and hence scripts and commands.

The following prefix in a ps1 script enables the -WhatIf and -Confirm parameters:

    [CmdletBinding(SupportsShouldProcess=$true)]
To enable -Confirm by default for scary scripts, just use:

    [CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact='High')]
 
The nice thing is that in PowerShell, unlike bash, this flows through to the vast majority of other commands. If the script has the snippet above, then you don't have to litter it with "if ( $userSaidYes ) { ... }" blocks all over the place.

Similarly, PowerShell automatically wires up logic to produce all of the useful modes you might want:

    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend
This is very fiddly to implement manually, and "Suspend" is likely impossible for most shells.

See: https://docs.microsoft.com/en-us/powershell/scripting/learn/...

Re: Type in the exact number of machines to proceed

#255

This resonates with me. Years ago I took down a service in a cell accidentally (Googlers might empathize: never 'borg' when you meant to 'borgcfg'). If I had been asked to enter the exact number of tasks I was about to nuke, I might have thought twice ;)

I've certainly deliberately downed an enormous number of tasks, though, as part of a cluster turn-down. I love the technique of requiring the operator to echo a key fact, but in the case you're describing I think the key fact is not how many tasks but that that they're serving live traffic. So: * You could ask the operator to echo the qps figure...but really any number other than zero is likely to be an error, so it…

The way we approached this on my SRE team was semi-manual with improved ergonomics. We embedded the live traffic graph in the turndown tool, so it would be right in your face before you took the destructive action. Of course it was always possible to go one level down on the tooling and do everything manually, but it wasn't the usual way.

Re: Type in the exact number of machines to proceed

#256
post #62

I have a habit of creating cli tools, which potentially do dangerous things, to default to dry-run mode. For example, instead of the typical `--dry-run` or `-n` option, my scripts instead had a cheesy `--do-it` to be non-dry-run. It is annoying as hell to my colleagues, but saved the day many times.

I once came across one like this

$ run-script.sh --dry run

`--dry-run` parameter not recognized

Executing ...

Re: Type in the exact number of machines to proceed

#258

I've seen this called "pointing and calling" [1], Japan's train drivers use the technique to force themselves to perform actions and take notice of the current environment. I personally took it to heart, it's a good system for forcing a cache miss in the brain - make sure you're on "database production" or "database localhost" etc. [1] https://en.wikipedia.org/wiki/Pointing_and_calling

I do this with my kids, gesturing (not pointing) as it helps my mind remain focused on truly listening to them amid everything else going on. I probably look ridiculous, but I'm a better father for it so ¯\_(ツ)_/¯

Re: Type in the exact number of machines to proceed

#259

I've seen this called "pointing and calling" [1], Japan's train drivers use the technique to force themselves to perform actions and take notice of the current environment. I personally took it to heart, it's a good system for forcing a cache miss in the brain - make sure you're on "database production" or "database localhost" etc. [1] https://en.wikipedia.org/wiki/Pointing_and_calling

I've only been in the job field for six years, and yet: My first boss accidentally deleted our QA database, meaning to delete a local copy A later boss accidentally deleted our production database, thinking it was the clone that he had just made (which luckily we still had) Both of them were very experienced developers in their 40s. Nobody is beyond this kind of mistake.

I deleted our production CRM database meaning to delete the test database. While my boss was running queries on the database for setting my quarterly bonus.

Good news is that I was deleting the test database to ensure that the recovery from backups was properly automated, so it wasn't down too long.

Re: Type in the exact number of machines to proceed

#260

It amazes me that something like this can be done by a single person. In aviation any time input is given to the machine, it's entered by one human (typically pilot flying) and then verified by the other human (typically pilot monitoring) before being committed to or executed. For example... when a new altitude is assigned by ATC, say FL300, the pilot flying will spin it in the selector window and keep his hand or fi…

In shops where stakes are high, it’s not uncommon to do just like you said—have mechanisms that force someone else to verify what you’re about to do, before you do it. If someone else can’t verify, the tool will block you. It’s similar in spirit to requiring code reviews on all shipped code.
Post reply on HN