3 ms·
Going by the Salus' summary: - Write programs that do one thing and do it well. - Write programs to work together. - Write programs to handle text streams, b
by masklinn 5y ago
Going by the Salus' summary:
- Write programs that do one thing and do it well.
- Write programs to work together.
- Write programs to handle text streams, because that is a universal interface.
(3) definitely makes no sense outside of CLI commands, (2) is too ill-defined to be of any use (at least outside of programs, though even for programs it seems to be quite redundant with 3), which leaves (1)... which is basically a matter of taste: "one thing" is an extremely ill-defined concept, and you could easily argue that most of the useful SUS commands break it, especially (though not exclusively) if you look at it from GNU's coreutils.
- codesections 5y ago> (3) ["write programs to handle text streams"] definitely makes no sense outside of CLI commands I'm not sure I'd say that. In the web development world, you'll definitely see people arguing to "JSON all the things" (text) but others arguing to "protobuff all the things" (binary). And they raise many of the same simplicity-vs-performance issues that came up for Unix CLI commands. As for (1) and (2) being too ill-defined/a matter of taste – well, I agree, but I don't think that means they're useless. I think of them as being in the same category as advice for writing prose ("Use short sentences where possible", "Avoid cliches"): helpful goals to keep in mind, even if I can't pin down exactly what they mean.
- Ar-Curunir 5y agoFor libraries defaulting to an untyped interface makes no sense.
- duped 5y agoIf you're using any kind of software that exchanges data in a human readable serialization format you're following 3, in some form. Like for example, an HTTP server or client
- masklinn 5y agoThat makes even less sense, the output is dictated by the purpose, it's not a choice.
- salawat 5y agoComputers don't run for computer's sake. They run due to extant human utility. That utility is itself existentially traceable to a human making a choice. No computer ever, has done something whose chain of causality does not return to a matter of human choice in orchestrating the circumstances for said outcome.