PunchyHamster
6 hours ago
it's weird that both lsof and ss defaults are so awful
Like, ss without any options shows such arcane, rarely needed details as send/receive queue size but not the application socket belongs to.
And omits listening sockets which is main use for such tools.
I know picking the right defaults is hard ask but they managed to pick all the wrong defaults.
jcgl
an hour ago
Completely agreed. Not sure what the historical reasons for lsof and ss are, but unix tools are structurally in a hard place when it comes to having sensible defaults over the long term.
Generally speaking, you can only have sensible defaults over time if you're able to change the defaults over time. New users and new use-cases come with time, and so what constitutes a "sensible default" changes.
However (and this is a drum I like to bang[0]), because unix tools only deal in usually-text bytestreams without any higher level of abstraction, consumers of those tools end up tightly coupled with how output is presented. Without any separation between data and its representation, the (default) representation is the tool's API. To change the default representation is to make a backwards-incompatible API change. A good example of this is how ps aux truncates longer than like 7 characters.
ectospheno
10 minutes ago
Don’t “netstat -utan” and “ss -utan” show basically the same thing?
laserbeam
28 minutes ago
> I know picking the right defaults is hard
I think we understand that UX problem much better now than developers did back in the 70s. In general, not just for ss/lsof
petepete
6 hours ago
I think the same applies for many of the new breed of command line applications like fd and ag/rg.
Being able to use them intuitively trumps ubiquity, speed or features.
fn-mote
an hour ago
Very curious what is wrong about the rg defaults.
The only one I change is to add `--no-ignore`.
PunchyHamster
5 hours ago
But it's not tradeoff! You can make default view useful without trading versatility.
Another annoying part is not supporting json or even CSV. Some tools got modernized with it (like iproute2 tool set), but for these you might as well do /proc scraping yourself...
sureglymop
4 hours ago
That's true in general. But default view is still subjective. The challenge probably lies in recognizing the larges subset of your user base that would like it to be a certain consistent way.
mr_mitm
5 hours ago
Depends on the use case.
If used in scripts, ubiquity and speed can be important. Then again, the output of ss is not ideal for script processing.
PunchyHamster
5 hours ago
That's the problem, it's not good for humans, it's not great for scripts