Live data from Hacker News

Why is Git Autocorrect too fast for Formula One drivers?

blog.gitbutler.com

231–240 of 248 posts

Re: Why is Git Autocorrect too fast for Formula One drivers?

#231
post #199

Earlier quoted context omitted.

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.

> I don't have references ... 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 th…

It's rhythm vs reaction time. We can keep a much smaller time interval rhythm than we can react at.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#232

Earlier quoted context omitted.

And this is exactly the kind the language should have a type for, Duration.

Not really. I don't want to have a type for an integer in seconds, a type for an integer in minutes, a type for an integer in days, and so forth. Just like I don't want to have a type for a float that means width, and another type for a float that means height. Putting the unit (as oppose to the data type ) in the variable name is helpful, and is not the same as types. For really complicated stuff like dates, sure ma…

> I don't want to have a type for an integer in seconds, a type for an integer in minutes, a type for an integer in days, and so forth.

This is not how a typical Duration type works.

https://pkg.go.dev/time#Duration

https://doc.rust-lang.org/nightly/core/time/struct.Duration....

https://docs.rs/jiff/latest/jiff/struct.SignedDuration.html

Re: Why is Git Autocorrect too fast for Formula One drivers?

#233

Earlier quoted context omitted.

Not really. I don't want to have a type for an integer in seconds, a type for an integer in minutes, a type for an integer in days, and so forth. Just like I don't want to have a type for a float that means width, and another type for a float that means height. Putting the unit (as oppose to the data type ) in the variable name is helpful, and is not the same as types. For really complicated stuff like dates, sure ma…

> I don't want to have a type for an integer in seconds, a type for an integer in minutes, a type for an integer in days, and so forth. This is not how a typical Duration type works. https://pkg.go.dev/time#Duration https://doc.rust-lang.org/nightly/core/time/struct.Duration.... https://docs.rs/jiff/latest/jiff/struct.SignedDuration.html

I'm just saying, this form of "Hungarian" variable names is useful, to always include the unit.

Not everything should be a type.

If all you're doing is calculating the difference between two calls to time(), it can be much more straightforward to call something "elapsed_s" or "elapsed_ms" instead of going to all the trouble of a Duration type.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#234

Earlier quoted context omitted.

> Variables must have units in their names if there's any ambiguity Then you end up with something where you can write "TimoutSec=60" as well as "TimeoutSec=1min" in the case of systemd :) I'd argue they'd been better of not putting the unit there. But yes, aside from that particular weirdness I fully agree.

> Then you end up with something where you can write "TimoutSec=60" as well as "TimeoutSec=1min" in the case of systemd :) But that's wrong too! If TimeoutSec is an integer, then don't accept "1min". If it's some sort of duration type, then don't call it TimeoutSec -- call it Timeout, and don't accept the value "60".

Can we call this the microwave paradox

Re: Why is Git Autocorrect too fast for Formula One drivers?

#235

> Originally, if you typed an unknown command, it would just say "this is not a git command". Back in the 70s, Hal Finney was writing a BASIC interpreter to fit in 2K of ROM on the Mattel Intellivision system. This meant every byte was precious. To report a syntax error, he shortened the message for all errors to: EH? I still laugh about that. He was quite proud of it.

Pretty cool.. I had no idea Hal was such a hacker on the personal computers in those days... makes me think of Bitcoin whenever I hear Hal mentioned

He wasn't hacking. Hal worked for Aph, and Aph contracted with Mattel to deliver console game cartridges.

There was once a contest between Caltech and MIT. Each was to write a program to play Gomoku, and they'd play against each other. Hal wrote a Gomoku-playing program in a weekend, and it trashed MIT's program.

It was never dull with Hal around.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#236

IMHO this is a great example of "creeping featurism". At best it introduces unnecessary complexity, and at worst those reliant on it will be encouraged to pay less attention to what they're doing.

What I don't get is why anyone would want to allow the automation. Is it really that difficult to use the up-arrow key and correct the mistake? Doing something automatically when it's sort-of correct is a recipe for doing things you didn't intend to do.

Things seem to be going in that direction with LLMs, unfortunately.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#237
post #201

Earlier quoted context omitted.

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 also have a method parseDuration which accepts a variety of simple but unambiguous string formats for these, like "10ms", "1s", "2h30m", "1m100us", "0", "inf", etc. 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":…

Mixed unit durations are in ISO 8601, so the idea has had at least some scrutiny:

https://en.wikipedia.org/wiki/ISO_8601#Durations

One place i have run into confusion is being able to express a given span of time in multiple ways. 1m30s and 90s are the same length, but are they the same thing? Should we always normalise? If we do, do we normalise upwards or downwards? This hasn't actually been a problem with time, but i do similar handling with dates, and it turns out we often want to preserve the distinction between 1y6m and 18m. But also sometimes don't. Fun times.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#238
post #27

Reading this post, the term "software archeology" and "programmer archeologist" come to mind. (Thank you, Vernor Vinge, for the latter concept.)

I can’t help but feel like you’re calling me “old”…

A dinosaur, even

Re: Why is Git Autocorrect too fast for Formula One drivers?

#239
post #140

Earlier quoted context omitted.

Sure, yes. But for human consumption, decisecond is something one can relate to. I mean, you probably cannot sense the difference in duration between 20 and 30 ms without special equipment. But you can possibly sense the difference between 2 and 3 deciseconds (200 ms and 300 ms) after some practice. I think the issue in this case was rather the retrofitting a boolean setting into a numerical setting.

> But you can possibly sense the difference between 2 and 3 deciseconds (200 ms and 300 ms) after some practice. At 120bpm a sixteenth note is 125ms, the difference is very obvious I would think

But then the tune is muliple beats long, and that misses my point.

Re: Why is Git Autocorrect too fast for Formula One drivers?

#240

Earlier quoted context omitted.

Sure, yes. But for human consumption, decisecond is something one can relate to. I mean, you probably cannot sense the difference in duration between 20 and 30 ms without special equipment. But you can possibly sense the difference between 2 and 3 deciseconds (200 ms and 300 ms) after some practice. I think the issue in this case was rather the retrofitting a boolean setting into a numerical setting.

The difference between 20 ms and 30ms is the difference between 33 fps and 50 fps which is entirely noticable on a 1080p60hz screen.

Sure, but that's a continous stream of frames, which is not 300 ms long or whatever.
Post reply on HN