3 ms·
Most, I agree with, others, I don't. > 1. Every option that can have a default option should have a default option. The exception to this are output files. A
by MereInterest 10y ago
Most, I agree with, others, I don't.
> 1. Every option that can have a default option should have a default option.
The exception to this are output files. A program should only output to a path that has been explicitly given to it. Too many scripts litter their working directory with output files.
> 8. Don't go for a long period without output to the user.
If there nothing's wrong, then nothing needs to be printed. Especially once a script gets called from another script, I don't want to have any output from a script unless it requires my attention.
- dsr_ 10y agoDefault output files: that's what stdout is for.
- dllthomas 10y ago> I don't want to have any output from a script unless it requires my attention. I lean this way, too. That said, a rare "this may take a while" before things that may take a while might do more good than harm. Another option is letting the user ask for a status update (maybe with a signal, like dd?).
- userbinator 10y agoMost, I agree with, others, I don't. This is the fundamental reason why I've grown tiresome of the phrase "best practices". They probably are the best you can come up with, but that doesn't mean they're the best (or sometimes even close) for everyone else.
- MereInterest 10y agoI think the discussions are useful, even if the conclusions aren't. Discussing best practices gets everyone to bring up the pros and cons of each. Then, when confronted with a new area, one can apply those arguments to figure out a decent set of best practices for that particular field.