So, you type `git pshu<enter>` 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
Not gonna believe that without empirical evidence.
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.
> So it is not a reaction time, but an enter to ctrl+c scenario.
At minimum, if we ignore the whole "changing your mind" thing. And for comparison: the world record for typing speed (over 15 seconds and without using any modifier keys) is around 300wpm, which translates to one keypress every 40ms - you really think 100ms to press two keys is something "you can absolutely" do? I'd believe that some* people could sometimes do it, but certainly not just anyone.
I'm not a competitive speed typist or anything but I struggle to get above 110 on a standard keyboard and I don't think I've ever seen anyone above the 125-130 range.
[0] https://www.typingpal.com/en/documentation/school-edition/pe...
Similar to the other reply, I also commonly do that when typing, where I know I've fat fingered a word, exclusively from the feeling of the keyboard.
But also, your not just trying to beat the fork/exec. You can also successfully beat any number of things. The pre-commit hook, the DNS look up, the TLS handshake. adding an additional 100ms of latency to that could easily be the difference between preempting some action, interrupting it or noticing after it was completed.
I wrote this bash script:
#!/usr/bin/env bash
start_time=$(gdate +%s%3N)
# Function to handle Ctrl+C (SIGINT)
on_ctrl_c() {
end_time=$(gdate +%s%3N)
total_ms=$((end_time - start_time))
# Calculate integer seconds and the remaining milliseconds
seconds=$((total_ms / 1000))
millis=$((total_ms % 1000))
# Print the runtime in seconds.milliseconds
echo "Script ran for ${seconds}.$(printf '%03d' ${millis}) seconds."
exit 0
}
# Trap Ctrl+C (SIGINT) and call on_ctrl_c
trap on_ctrl_c INT
# Keep the script running indefinitely
while true; do
sleep 1
done
And then i typed "bash sleep.sh git push origin master<enter><ctrl+C>"and got "Script ran for 0.064 seconds."
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.
Reaction to unreasonable, unexpected events will be very slow due to processing and trying to understand what happens and how to respond. Examples, you are a racecar driver, participating in a race, you're driving your car on a racetrack in a peaceful country.
An armed attack: Slow reaction time, identifying the situation will take a long time, selecting an appropriate response will take longer.
A kid running into the road on the far side of the audience stands: Faster.
Kid running into the road near the audience: Faster.
Car you're tailing braking with no turn to come: Faster.
Crashed car behind a turn with bad overview: Faster.
Guy you're slipstreaming braking before a turn: Even faster.
For rhythm games, you anticipate and time the events, and so you can say these are no longer reactions, but actions.
In the git context, where you typed something wrong, the lines are blurred, you're processing while you're acting, you're typing while you're evaluating what you're typing, first line of defence is you're feeling/sensing that you typed wrong, either from the feedback that your fingers touched too many keys, or that you felt the rhythm of your typing was wrong, at least for me, this happens way faster than my visual input. I'm making errors as I type this, and they're corrected faster than I can really read it, sometimes I get it wrong and deleted a word that was correct. But still, watching people type, I see this all the time, they're not watching and thinking about the letters exclusively, there's something going on in their minds at the same time. 100 ms is a rather wide window in this context.
Also, that said, we did a lot of experiments at work with a reaction time tester, most people got less than 70 ms after practice (a led lights up at a random interval between 2 and 10 seconds)