4 ms·
Some observations: - Tool options increasing monotonically seems like the very definition of bloat. Probably since the marginal cost of adding an option is v
by kjellsbells 5y ago
Some observations:
- Tool options increasing monotonically seems like the very definition of bloat. Probably since the marginal cost of adding an option is very low and the cost of removing an option is very high (angry users).
- There's a cognitive cost to bloat. Personally, I know maybe 5-10 options to all the commands in the regular *nix tool set and that's about the limit my brain could hold.
- Options are useless if they are not discoverable at lower mental effort than the alternatives. Man/info pages are great, but I'm not wading through multiple pages on the off chance that ls has an option that can output in JSON if it's a Wednesday and my POSIX locale is unset. Discoverability is a serious problem in large systems, and I'm not sure anyone knows what the solution is. I mean, we've had google, Stack Overflow, man X intro, GNU info, ...
So what does that mean in practice? Is there a way to square modernity with the UNIX philosophy? I would suggest that
1. Tool authors ruthlessly restrict options to fit in the working set memory of the average human user. Let's say <10 options. If you need more options, you need a new tool.
2. Tools are pluggable, so that the base implementation is simple and known-to-be-present (shades of POSIX here), but that there is a expansion pack mechanism for people who need it. Imagine DLC for ls. You want extra magicka in your find(1)? Make sure you have the plugin and off you go.
3. Tools designers and users are clear about the decision criteria to *not\* use a specific tool. Sure I could do crypto in awk, or parse \0 in ls, but I shouldn't do so. There's no shame in reaching for a better solution, and, over time, solutions will coalesce into new tools. For example, everyone uses jq not awk to parse their JSON...right?
Edit: I just returned from my kitchen with a IRL example: my dishwasher has 15 programs but only two buttons show any sign of wear: "quick wash" and "start"...