4 ms·
In 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 fi
by shawabawa3 2y ago
In 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 :)