3 ms·
The only thing I really take away from the UNIX philosophy nowadays (I used to be a dyed in the wool fan of UNIX/Linux) is #1) do one thing and do it we
by quanticle 4y ago
The only thing I really take away from the UNIX philosophy nowadays (I used
to be a dyed in the wool fan of UNIX/Linux) is #1) do one thing and do it
well. I see #2 as an ideal goal to reach but not always required.
If you have a number of programs, each of which does one thing and does it well, those programs will need to exchange data between themselves in order for the overall system to be useful to the user. To go back to the `ls` example I used in my post above: `ls` should just list files. Why should `ls` have anything to do with sorting, when `sort` exists? The reason, as it stands right now, is that `ls`'s plain text output is too much of a pain to parse, and so it's more convenient to build sorting into `ls` itself. If you start with "do one thing and do it well", but ignore interoperability, then your program will inevitably grow additional options and subcommands until it does one thing well, and quite a lot of things mediocrely. Instead of a collection of small sharp specialized tools, you'll end up with, e.g. `find`.
- deafpolygon 4y agoOne thing well, can also be seen as listing directories in many different ways.
- quanticle 4y agoBy that logic `perl` is a tool that does "one thing", where that "one thing" just happens to be "everything".