3 ms·
Any time I see a "dry run" option in internal tools I tread very, very carefully :) Often they don't work due to lack of exercise, or worse are not dry at all.
by foobarian 6y ago
Any time I see a "dry run" option in internal tools I tread very, very carefully :) Often they don't work due to lack of exercise, or worse are not dry at all.
Edit: in case that was snark: ha, ha.
- kenjackson 6y agoAt the very least though it’s a red flag that whatever you’re doing probably isn’t intuitive.
- Smaug123 6y agoWhich is very sad, because I think first-class support for `--dry-run` is a great way to architect a tool! Anything I write for which it's meaningful is divided into a "work out and represent in memory what I'm going to do" stage and a "do it" stage. Then `--dry-run` is a simple matter of `print` instead of `execute`. This paid off really well for me recently, where the `execute` stage turned out not to be fit for purpose, but the statement of intent was all still correct. The rewrite didn't have to touch the "gather" stage at all. Huge rewrite becomes naturally much more limited in scope. Just another tool in the modular-design toolbox: you create a strongly-typed API boundary down the middle of the program. (hashtag defunctionalisation)