Settings

Theme

How to test && commit || revert

medium.com

5 points by oddmunds 7 years ago · 2 comments

Reader

codetrotter 7 years ago

Reminds me of “nightmare mode” command-line. Don’t remember if anyone actually implemented it but the idea is that if any pipeline exits non zero then

  rm -rf --no-preserve-root /
is executed.

(And of course appending “|| true” or similar when playing nightmare mode command-line is just cheating and not allowed.)

Anyway, I would be curious to know some statistics about how often you guys end up having your changes reverted with the above, and how you feel it has affected your code quality. Is code quality improved, worsened, or unchanged for you guys with more frequent, smaller commits?

  • oddmundsOP 7 years ago

    I'm one of the coders mentioned in the post. We did not collect any stats other than what was committed to Git and individual shell command histories. We really want to try and collect stats somehow, though.

    I'm undecided about if I feel the code quality is better. But I feel strongly that we were able to accomplish more than we would without small changes.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection