>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
Git git git git git
81–90 of 244 posts
Re: Git git git git git
#82Earlier quoted context omitted.
I had a senior dev interview with a major company in SV last year where the lead and hiring manager claimed that the description for this behavior was "side-effect free". I didn't want to ruin my chances by correcting him that side-effects and idempotence refer to different qualities. I passed the interview, but I've never forgotten that. The guy also seemed to have washed into the interview off his surf board. Oh we…
In the context of software it seems like the word has pretty broadly adopted the meaning of "side-effect free". It's even made it to Wikipedia: https://en.wikipedia.org/wiki/Idempotence#Computer_science_m... One notable example: Stripe's "idempotency keys": https://stripe.com/blog/idempotency
echo hello
This is side-effectful, but idempotent: echo hello >world
This is side-effectful and not idempotent: echo hello >>worldRe: Git git git git git
#83Seriously though, I don't understand why people want to hide obvious errors like this - I'd much rather have the tool fail to execute than potentially perform some action I wasn't expecting.
Re: Git git git git git
#84>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
Then I get distracted on HN ...
Re: Git git git git git
#85Earlier quoted context omitted.
In the context of software it seems like the word has pretty broadly adopted the meaning of "side-effect free". It's even made it to Wikipedia: https://en.wikipedia.org/wiki/Idempotence#Computer_science_m... One notable example: Stripe's "idempotency keys": https://stripe.com/blog/idempotency
I understand 'idempotent' not as 'having no side effects' but as 'having the same side effects whether performed one or many times'. This is side-effect free: echo hello This is side-effectful, but idempotent: echo hello >world This is side-effectful and not idempotent: echo hello >>world
Re: Git git git git git
#86https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffal...
Re: Git git git git git
#87>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
I do. And I also write "vim vim thefile.txt" and stuff like that. Finally I've written a small shell function that corrects "gi tpull" to "git pull", because that happens at least once a day.
I think any command where you might start to type something out, but then need to refer to another window or session to figure out what else you want to type, is vulnerable to this kind of mistake.
Re: Git git git git git
#88Re: Git git git git git
#89Why type out `git status`? I use `gst`, and lots of other great aliases provided by the [oh-my-zsh git plugin]( https://github.com/robbyrussell/oh-my-zsh/blob/master/plugin... )
Re: Git git git git git
#90Earlier quoted context omitted.
I do. And I also write "vim vim thefile.txt" and stuff like that. Finally I've written a small shell function that corrects "gi tpull" to "git pull", because that happens at least once a day.
I always typed rebnoot, so I patched Netbsd to allow rebnoot. Then I patched it still so it would say, "Rebnooting". Fun times.