News for hackers. Stuff that matters.
Re:Why is Git Autocorrect too fast for Formula One drivers? by 1970-01-01 on Sunday January 19, 2025 @02:27PM (#42760725)
Deciseconds?? There's your problem. Always work in seconds when forcing a function for your users.
Re:Why is Git Autocorrect too fast for Formula One drivers? by gruez on Sunday January 19, 2025 @03:24PM (#42761411)
better yet, encode the units into the variable/config name so people don't have to guess. You wouldn't believe how often I have to guess whether "10" means 10 seconds (sleep(3) in linux) or milliseconds (Sleep in win32).
Re:Why is Git Autocorrect too fast for Formula One drivers? by dusted on Sunday January 19, 2025 @03:24PM (#42761409)
at least fractions of a second, 250 would already be much more noticble.. 100 is a nice compromise between "can't react" and "have to wait", assuming you're already realizing you probably messed up
Re:Why is Git Autocorrect too fast for Formula One drivers? by 331c8c71 on Sunday January 19, 2025 @03:08PM (#42761228)
Seconds or milliseconds (e.g. if the setting must be integer) would've been fine as they are widely used. Deciseconds, centiseconds - wtf?
Re:Why is Git Autocorrect too fast for Formula One drivers? by atonse on Sunday January 19, 2025 @03:23PM (#42761405)
Falls squarely within the "They were too busy figuring out whether they could do it, to ask whether they SHOULD do it"
Re:Why is Git Autocorrect too fast for Formula One drivers? by UndefinedRef on Sunday January 19, 2025 @03:05PM (#42761189)
Maybe he meant dekaseconds? Still weird though..
Re:Why is Git Autocorrect too fast for Formula One drivers? by schacon on Sunday January 19, 2025 @03:12PM (#42761278)
We had this debate internally at GitButler. Deci versus deca (and now deka, which appears to also be a legit spelling). My assumption was that 1 full second may have felt too long, but who really knows.
Re:Why is Git Autocorrect too fast for Formula One drivers? by a3w on Sunday January 19, 2025 @04:00PM (#42761757)
deci is 1/10, deca is 10/1. So decisecond is correct.
Re:Why is Git Autocorrect too fast for Formula One drivers? by schacon on Sunday January 19, 2025 @04:05PM (#42761809)
I understand, I meant I tried to say the word “decisecond” out loud and we debated if that was a real word or if I was attempting to say “deca” which was understandable.
Re:Why is Git Autocorrect too fast for Formula One drivers? by zxvkhkxvdvbdxz on Sunday January 19, 2025 @10:36PM (#42764732)
It's very standardized (SI), meaning 1/10:th. Althought not so commonly used with seconds.

You might be more familiar with decimeters, deciliters, decibels or the base-10 (decimal) numbering system.

Re:Why is Git Autocorrect too fast for Formula One drivers? by quesera on Monday January 20, 2025 @11:36AM (#42770322)
Also "decimate" which used to mean "kill 1/10th of the soldiers", but now apparently means "destroy (almost) entirely". :)
Re:Why is Git Autocorrect too fast for Formula One drivers? by CRConrad on Monday January 20, 2025 @01:41AM (#42765657)
Sure, deca- as in "decade" is understandable. But why would deci- as in "decimal" be any less understandable?
Re:Why is Git Autocorrect too fast for Formula One drivers? by TonyTrapp on Sunday January 19, 2025 @03:10PM (#42761260)
It reads like the intention was that turning the parameter (0/1) command into an integer parameter, where the previous value enabled = 1 should behave reasonably close to the old behaviour. 1 deciseconds is arguably close enough to instant. If the parameter were measured in seconds, the command would always have to wait a whole second before executing, with no room for smaller delays.
Re:Why is Git Autocorrect too fast for Formula One drivers? by bot403 on Sunday January 19, 2025 @05:05PM (#42762448)
No, smaller delays <1s are also a misdesign here. Have we all forgotten we're reacting to typos? It's an error condition. It's ok that the user feels it and is inconvenienced. They did something wrong.

Do some think that 900ms, or 800, or some other sub-second value is really what we need for this error condition? Instead of, you know, not creating errors?

Re:Why is Git Autocorrect too fast for Formula One drivers? by synecdoche on Sunday January 19, 2025 @04:17PM (#42761949)
This may be something specific to Japan, which is where the maintainer is from. In the Japanese industrial control systems that I’ve encountered time is typically measured in this unit (100 ms).
Re:Why is Git Autocorrect too fast for Formula One drivers? by GuB-42 on Sunday January 19, 2025 @05:06PM (#42762473)
Deciseconds (100ms) are not a bad unit when dealing with UI because it is about the fastest reaction time. We can't really feel the difference between 50 ms and 150 ms (both feel instant), but we can definitely feel the difference between 500 ms and 1500 ms. Centiseconds are too precise, seconds are not enough. Also, it is also possible that the computer is not precise enough for centiseconds or less, making extra precision a lie.

Deciseconds are just uncommon. But the problem here is that the user didn't expect the "1" to be a unit of time but instead a boolean value. He never wanted a timer in the first place.

By the way, not making the unit of time clear is a pet peeve of mine. The unit is never obvious, seconds and milliseconds are the most common, but you don't know which one unless you read the docs, and it can be something else.

My preferred way is to specify the unit during the definition (ex: "timeout=1s") with a specific type for durations, second is to have it in the name (ex: "timeoutMs=1000"), documentation comes third (that's the case of git). If not documented in any way, you usually have to resort to trial and error or look deep into the code, as these values tend to be passed around quite a bit before reaching a function that finally makes the unit of time explicit.

Re:Why is Git Autocorrect too fast for Formula One drivers? by userbinator on Sunday January 19, 2025 @08:34PM (#42764030)
My default for times is milliseconds, since that's a common granularity of system timing functions.