This should always be included in any application that has a clear plan-then-execute flow, and it's definitely nice to have in other cases as well.
In praise of –dry-run
21–30 of 175 posts
Re: In praise of –dry-run
#22Re: In praise of –dry-run
#23Sort of a strange article. You don't see that many people _not_ praising --dry-run (speaking of which, the author should really learn to use long options with a double dash).
Re: In praise of –dry-run
#24--really
--really-really
--yolo
Re: In praise of –dry-run
#25In order to make it work without polluting the code-base I find that I have to move the persistence into injectable strategy, which makes it good anyway. If you keep passing in `if dry_run:` everywhere you're screwed. Also, if I'm being honest, it's much better to use `--wet-run` for the production run than to ask people to run `--dry-run` for the test run. Less likely to accidentally fire off the real stuff.
I don't want to have to type rm --wet-run tempfile.tmp every time, or mkdir -p --yes-really-do-it /usr/local/bin The program should default to actually doing whatever thing you're asking it to do. On the other hand it would be great if every tool had an --undo argument that would undo the last thing that program did.
> NILFS2 is a log-structured file system (LFS) supporting continuous snapshotting. In addition to versioning capability of the entire file system, users can even restore files mistakenly overwritten or destroyed just a few seconds ago.
https://docs.kernel.org/filesystems/nilfs2.html
Re: In praise of –dry-run
#26In order to make it work without polluting the code-base I find that I have to move the persistence into injectable strategy, which makes it good anyway. If you keep passing in `if dry_run:` everywhere you're screwed. Also, if I'm being honest, it's much better to use `--wet-run` for the production run than to ask people to run `--dry-run` for the test run. Less likely to accidentally fire off the real stuff.
I don't want to have to type rm --wet-run tempfile.tmp every time, or mkdir -p --yes-really-do-it /usr/local/bin The program should default to actually doing whatever thing you're asking it to do. On the other hand it would be great if every tool had an --undo argument that would undo the last thing that program did.
Re: In praise of –dry-run
#27--dry-run --really --really-really --yolo
Re: In praise of –dry-run
#28I like the opposite too, -commit or -execute as it is assumed running it with defaults is immutable as the dry run, simplifying validation complexity and making the go live explicit.
I've yet to have anyone mistakenly modify anything when they need to pass --commit, when I've repeatedly had people repeatedly accidentally modify stuff because they forgot --dry-run.
Re: In praise of –dry-run
#29"Do you really want to 'rm -rf /'? Type 'fiberglass' to proceed."
Re: In praise of –dry-run
#30I like the opposite too, -commit or -execute as it is assumed running it with defaults is immutable as the dry run, simplifying validation complexity and making the go live explicit.