Live data from Hacker News

Why is Git Autocorrect too fast for Formula One drivers?

blog.gitbutler.com

51–60 of 248 posts

Re: Why is Git Autocorrect too fast for Formula One drivers?

#51

I sometimes have this realization as I'm pressing enter and reflexively press ctrl+c. As someone whose typing speeds range from 100 to 160 WPM, this makes sense. Pressing keys is much different from Formula One pit stops.

That reflexivity felt a bit weird the first time I thought about it. I type the incorrect character, but reflexively notice and backspace it without even becoming aware of it until a moment later. I thought it'd be related to seeing an unexpected character appearing on the display, but I do it just as quickly and reflexively with my eyes closed.

That being said, there are obviously cases where you mistype (usually a fat-finger or something, where you don't physically recognise that you've pressed multiple keys) and don't appreciate it until you visually notice it or the application doesn't do what you expected. 100ms to react to an unexpected stimulus like that is obviously not useful.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#53
post #30

Pet peeve: Timespan configs that don't include the unit in the variable name. I'm so sick of commands with --timeout params where I'm left guessing if it's seconds or millis or what.

I'll bounce in with another iteration of my argument for avoiding language primitive types and always using domain-appropriate value types. A Duration is not a number type, neither float or integer. It may be implemented using whatever primitive the language provides, but for timeouts and sleep, what is 1 Duration? The software always encodes some definition of 1 unit in the time domain, make it clear to the user or programmer.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#54
post #42

I agree that 'prompt' should be the value to set if you want git autocorrect to work for you. I'd however want that the Y is the default rather than the N, so that a user can just press enter once they've confirmed it. In any case it is not a good idea to have a CLI command happen without your approval, even if the intention was really obvious.

If prompt is the default, mistyped scripts will hang rather than exit 1 if they have stdin open. I think that causes more problems than it solves.

That's what isatty() is for. If stdin is not a TTY, prompting should not be the default. Many programs change their defaults or their entire behavior based on isatty().

Re: Why is Git Autocorrect too fast for Formula One drivers?

#55
post #46

This seems like really quite bad design. EDIT: 1) is the result of my misreading of the article, the "previous value" never existed in git. 1) Pushing a change that silently break by reinterpreting a previous configuration value (1=true) as a different value (1=0.100ms confirmation delay) should pretty much always be avoided. Obviously you'd want to clear old values if they existed (maybe this did happen? it's unclea…

For point 1, I think you're misunderstanding the timeline. That change happened in 2008, during code review of the initial patch to add that option as a boolean, and before it was ever committed to the main git tree.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#56
post #48
post #46

This seems like really quite bad design. EDIT: 1) is the result of my misreading of the article, the "previous value" never existed in git. 1) Pushing a change that silently break by reinterpreting a previous configuration value (1=true) as a different value (1=0.100ms confirmation delay) should pretty much always be avoided. Obviously you'd want to clear old values if they existed (maybe this did happen? it's unclea…

“Design” to me intimates an intentional broad-context plan. This is no design, but an organic offshoot

Someone thought of a feature (i.e. configurable autocorrect confirmation delay) and decided the interface should be identical to an existing feature (i.e. whether autocorrect is enabled). In my thinking, that second part is "design" of the interface.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#57

Reaction times differ by types of stimulus, auditory is slightly faster than visual and tactile slightly faster than that at 90 - 180 ms So if git gave you a slap instead of an error message you might just about have time to react.

The slapping device would need to build inertia for you to feel the slap. Is 10ms enough for that?

I think if it's spring-loaded then definitely. (But it's 100ms, not 10ms.)

Re: Why is Git Autocorrect too fast for Formula One drivers?

#58
post #44

Earlier quoted context omitted.

In this case the reaction starts before you hit enter, as you're typing the command So, you type `git pshu ` and realise you made a typo before you've finished typing. You can't react fast enough to stop hitting enter but you can absolutely ctrl+c before 100 more ms are up

> you can absolutely ctrl+c before 100 more ms are up Not gonna believe that without empirical evidence.

I think they are talking about times where you realize a mistake as you are making it as opposed to hindsight, given that 100ms seems pretty reasonable.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#59

IMHO this is a great example of "creeping featurism". At best it introduces unnecessary complexity, and at worst those reliant on it will be encouraged to pay less attention to what they're doing.

That's git in a nutshell. An elegant data structure masked by many layers of unnecessary crap that has accumulated over the years.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#60
I enabled autocorrect (set a 3sec) a year ago and have the following observations about it:

1. it does not distinguish between dangerous and safe actions

2. it pollutes my shell history with mistyped commands

Reading this article gave me just enough of a nudge to just disable it after a year.

Post reply on HN