Live data from Hacker News

Why is Git Autocorrect too fast for Formula One drivers?

blog.gitbutler.com

71–80 of 248 posts

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

#71
> Which was what the setting value was changed to in the patch that was eventually accepted. This means that setting help.autocorrect to 1 logically means "wait 100ms (1 decisecond) before continuing".

The mistake was here. Instead of retargeting the existing setting for a different meaning, they should have added a new setting.

    help.autocorrect - enable or disable
    help.autocorrect.milliseconds - how long to wait
There are similar mistakes in other systems, e.g., MySQL has

    innodb_flush_log_at_trx_commit
which can be 0 if disabled, 1 if enabled, and 2 was added as something special.

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

#72

Earlier quoted context omitted.

Maybe worth noting here that 100ms is well under the human reaction time. For context, professional sprinters have been measured to have a reaction time in the ballpark of 160ms, for pretty much everyone else it's higher. And this is only for the reaction, you still need to move your hand, press the keys, etc.

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

Let's say you are right. What would be a reason for pressing ctrl+c instead of letting the command go through in your example?

The delay is intended to let you abort execution of an autocorrected command, but without reading the output you have no idea how the typos were corrected.

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

#73

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.

If anything, it’s better to set up aliases for frequent typos. (Still “pollutes” the shell history of course.)

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

#74
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 am not sure, have you read it properly? The scenario is that you are pushing enter, halfway change your mind, and your are switching to ctrl+c. So it is not a reaction time, but an enter to ctrl+c scenario.

Regarding reaction time, below 120ms (on a computer, in a browser(!)) is consistently achievable, e.g. this random yt video https://youtu.be/EH0Kh7WQM7w?t=45 .

For some reason, I can't find more official reaction time measurements (by scientists, on world champion athletes, e-athletes), which is surprising.

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

#75
post #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…

I type a lot while looking away from the monitors, helps me think / avoid the stimulus of the text on the screen. I can tell when I fat finger. It also pissed off the boomers at the bar who thought I was showing off as I was a) typing faster then they could, and b) not looking at the screen, c) sometimes looking blankly past them (I'm really not looking when I do this sometimes).

also I typed this entire thing that way without looking at it other than for red squiggles.

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

#76
> Junio came back to request that instead of special casing the "1" string, we should properly interpret any boolean string value (so "yes", "no", "true", "off", etc)

The fact that this guy has been the Git maintainer for so long and designs settings like this explains a lot!

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

#77

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.

About 2, well, you are the actual polluter, even if you just scroll back in history andnuse the same last wrong command because it works anyway.

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

#78

> Originally, if you typed an unknown command, it would just say "this is not a git command". Back in the 70s, Hal Finney was writing a BASIC interpreter to fit in 2K of ROM on the Mattel Intellivision system. This meant every byte was precious. To report a syntax error, he shortened the message for all errors to: EH? I still laugh about that. He was quite proud of it.

How wasteful, ed uses just ? for all errors, a 3x saving

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

#79

> Originally, if you typed an unknown command, it would just say "this is not a git command". Back in the 70s, Hal Finney was writing a BASIC interpreter to fit in 2K of ROM on the Mattel Intellivision system. This meant every byte was precious. To report a syntax error, he shortened the message for all errors to: EH? I still laugh about that. He was quite proud of it.

It'd be interesting and amusing if he'd made the private key to his part of Bitcoin a variation on that.

RIP.

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

#80

Deciseconds is such an oddball choice of units. Better to specify the delay in either milliseconds or seconds - either are far more commonly used in computing.

It's a decent, if uncommon, unit for human reactions. The difference between 0 and 1 seconds is a noticeably long time to wait for something, but the difference between n and n+1 milliseconds is too fine to be useful.
Post reply on HN