Earlier quoted context omitted.
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.
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.
Why is Git Autocorrect too fast for Formula One drivers?
211–220 of 248 posts
Re: Why is Git Autocorrect too fast for Formula One drivers?
#212Earlier quoted context omitted.
In an earlier iteration the configuration value was Boolean true/false. A 1 was interpreted as true. They changed it to an integral value. This is the entire setup for the problem in the article. Elsewhere, 1 is still allowed as a true equivalent.
But then they made it not be a boolean when they added the delay. They went the opposite direction and it caused problems. How is this a situation of "tripling down"? It seems to me like they couldn't make up their mind.
Now, because of this confusion, they’re special-casing 1 to actually mean 0. But other integers are still themselves. They’ve also now added logic to make "yes", "no", "true", "off“ strings be interpreted as booleans now too.
Re: Why is Git Autocorrect too fast for Formula One drivers?
#213The root cause here is poorly named settings. If the original setting had been named something bool-y like `help.autocorrect_enabled`, then the request to accept an int (deciseconds) would've made no sense. Another setting `help.autocorrect_accept_after_dsec` would've been required. And `dsec` is so oddball that anyone who uses it would've had to look up. I insist on this all the time in code reviews. Variables must…
Re: Why is Git Autocorrect too fast for Formula One drivers?
#214Earlier quoted context omitted.
One of my favorite features of std::chrono (which can be a pain to use, but this part is pretty sweet) is that you don't have to specify the exact time unit, just a generic duration. So, combined with chrono literals, both of these work just like expected: std::this_thread::sleep_for(10ms); // sleep for 10 milliseconds std::this_thread::sleep_for(1s); // sleep for one second std::this_thread::sleep_for(50); // does n…
I do something similar in Java by taking a java.time.Duration in any method dealing with time. We don't have the snazzy literal syntax, but that means users have to write: someMethodDealingWithTime(Duration.ofMillis(10)); someMethodDealingWithTime(Duration.ofSeconds(1)); someMethodDealingWithTime(50); // does not compile Since these often come from config, i also have a method parseDuration which accepts a variety of…
I did that too with parsers for configuration files; my rule of thumb is that the unit has to always be visible somewhere anywhere a numeric parameter occurs - in the type, in the name, or in the value. Like e.g.:
// in config file:
{ ..., "timeout": "10 seconds", ... }
// in parsing code:
auto& ParseTimeout(const std::string&) -> Expected;
// in a hypothetical intermediary if, for some reason, we need to use a standard numeric type:
int timeoutMsec = ....;
Wrt. string formats, I usually allowed multiple variants for a given time unit, so e.g. all these were valid and equivalent values: "2h", "2 hour", "2 hours". I'm still not convinced it was the best idea, but the Ops team appreciated it.(I didn't allow mixing time units like "2h30m" in your example, as to simplify parsing into single "read double, read rest as string key into a lookup table" pass, but I'll think about allowing it the next time I'm in such situations. Are there any well-known pros/cons to this?)
Re: Why is Git Autocorrect too fast for Formula One drivers?
#215Re: Why is Git Autocorrect too fast for Formula One drivers?
#216Earlier quoted context omitted.
On the contrary, it offers a little levity and humour, and possibly even the chance for some self-reflection as you consider why you thought it was appropriate to insult the folk who manage Git. I'm sure you can manage at least one of those?
Your comment isn't funny, just snarky. I suggest you read again HN guidelines and do some reflection yourself. Also, if you see it as insult, that's your mistake. It is just a simple empirical observation. I'm not saying it's an original thought - feel free to Google more about this topic. I won't waste any more time since you obviously aren't interested in discussion.
Pot. Kettle. Black.
Re: Why is Git Autocorrect too fast for Formula One drivers?
#217Re: Why is Git Autocorrect too fast for Formula One drivers?
#218Earlier quoted context omitted.
What is the argument for it being too high? The argument for it being what it is is the fact that our auditorial processing (when using a starter pistol) or visual processing (looking at start-lights) takes time, as well as transferring that message to the relevant muscles. 100 milliseconds is a pretty good average actually
Basically, some people can consistently respond faster. The 100ms figure just isn't accurate. I don't have extensive resources/references at hand, but I've read about this a few times over the years.
Yeah well, I did a psych bsc and I'm telling you that it's impossible.
It's certainly possible for people to do and notice things way faster than that, like a musician noticing a drummer being a few ms off beat, or speedrunners hitting frame perfect inputs, but in those cases the expectation and internal timekeeping is doing most of the heavy lifting.
Re: Why is Git Autocorrect too fast for Formula One drivers?
#219Deciseconds 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.
I got really confused for a moment, thinking that "deciseconds" was some git-unit meaning "seconds needed to make a decision", like in "decision-seconds" xD Note: english is not my mother tongue, but I am from the civilised part of the world that uses the metric system FWIW.
Re: Why is Git Autocorrect too fast for Formula One drivers?
#220Deciseconds 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.
I got really confused for a moment, thinking that "deciseconds" was some git-unit meaning "seconds needed to make a decision", like in "decision-seconds" xD Note: english is not my mother tongue, but I am from the civilised part of the world that uses the metric system FWIW.