Live data from Hacker News

Git git git git git

caiustheory.com

81–90 of 244 posts

Re: Git git git git git

#82

Earlier 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

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

#83
erm, "git git foo"; in most shells can be fixed with "!*" as your next command. Repeat until lameness subsides.

Seriously 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.

I do it all the time, but never thought it was the problem. Most often its to look up a reference number for a commit,

Then I get distracted on HN ...

Re: Git git git git git

#85
post #82

Earlier 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

Interestingly, in this case the non-idempotent option is less safe.

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.

Yes! I do all of those things too. git git, vim vim, and 'gi tpull' and 'gi tpush' and everything.

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

#89

Why 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... )

The zsh git plugin, and scm_breeze (https://github.com/scmbreeze/scm_breeze), are two of my favorite nice-to-haves for improving the Git experience.

Re: Git git git git git

#90

Earlier 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.

Can't tell if serious...
Post reply on HN