3 ms·
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
by Etheryte 2y ago
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.
- shawabawa3 2y agoIn this case the reaction starts before you hit enter, as you're typing the command 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
- brazzy 2y ago> you can absolutely ctrl+c before 100 more ms are up Not gonna believe that without empirical evidence.
- burnished 2y agoI 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.
- deleted 2y ago[deleted]
- bmacho 2y agoI 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 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.
- brazzy 2y agoThat scenario seems to me fishy to begin with, is that something that actually happens, or just something people imagine? How would it work that you "change your mind halfway through" and somehow cannot stop your finger from pressing enter, but can move them over and hit ctrl-c in a ridiculously short time window? > 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.
- dusted 2y agoThat'd be interesting, but I don't know how to prove that I'm not just "pretending" to make typos and correcting them instantly ?
- Etheryte 2y agoI'm still pretty skeptical of this claim. If you type 60 wpm, which is faster than an average human, but regular for people who type as professionals, you spend on average 200ms on a keystroke. 60 standard words per minute means 300 chars per minute [0], so 5 chars per second which is 200ms per char. Many people type faster than this, yes, but it's all still very much pushing it just to even meet the 100ms limit, and that's without any reaction or anything on top. [0] https://en.wikipedia.org/wiki/Words_per_minute https://en.wikipedia.org/wiki/Words_per_minute
- pc86 2y agoEven if you typed 120 wpm, which is "competitive typing" speed according to this thing[0], it's going to take you 200ms to type ctrl+c, and even if you hit both more-or-less simultaneously you're going to be above the 100ms threshold. So to realistically be able to do something like beat the threshold during normal work and not a speed-centered environment you're probably looking at regularly 160 wpm or more? 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/pedagogical-resources/typing-speed https://www.typingpal.com/en/documentation/school-edition/pe...
- grayhatter 2y agoFor whatever it's worth*: I'm not skeptical of it at all. I've done this in a terminal before without even looking at the screen, so I know it can't have anything to do with visual reaction. 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.
- shawabawa3 2y agoI just tried it out. 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."
- yreg 2y agoLet'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.
- dusted 2y agoYes exactly! This is what I'm trying to argue as well, it happens quite often for me that I submit a typo because it's already "on it's way out" when I catch it (but before, or about the same time it's finished and enter is pressed), so the ctrl+c is already on it's way :)
- dusted 2y agoThere are different ways to measure reaction time. Circumstance is important. 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)
- tomatotomato37 2y agoI also want to add in the context of human sprinters & F1 drivers, their reaction time is measured via leg actuation, which for a creature evolved to be an object-throwing endurance hunter is going to have worse neural & muscular latency than, say, your forearm. That is why using your finger to trigger a response in a conventional computer time tester can get such high speeds, cause we're essentially evolved for it.