from Hacker News

Trainwreck Design

by j3s on 8/14/24, 11:06 PM with 103 comments

  • by topspin on 8/19/24, 7:55 AM

    This complaint about df/mount/etc. recurs with noticeable frequency. Another ugly spot is iproute2's ip link/addr. Between containers and VMs and their virtual interfaces, link bonding, virtual bridges, macvlan/tap, etc., the list of "interfaces" proliferates. Trying to find an actual physical interface is difficult, and interpreting what is there is a challenge.

    Improving this stuff isn't happening because no one is funding the work. A hobbyist or gainfully employed contributor stealing time from "real" work can't manage this anymore: complexity is too high now and the gatekeepers aren't -- for good reason -- going to tolerate naïve contributions.

    There is very little money in the Linux world for anything a Linux distributor or hardware manufacturer doesn't care about. The former care only about the high value features people pay license/subscription/support fees for, and the latter just get drivers working, and maybe rework a kernel subsystem when absolutely necessary, and leave the rest.

    The money exists. The Linux Foundation collects a quarter billion a year, for example. But they've found a long list of better priorities to spend it all on.

    I don't know about the "trainwreck design" concept. There is nothing here that can't be solved given some hard headed refinement. It's just that no one is doing that.

  • by notachatbot1234 on 8/19/24, 7:16 AM

    A webpage that uses numeric identifiers for external references that are found only when scrolling to the very bottom of the page and show their URLs as plain text. Now that is a train wreck.

    Hyperlinks are the cornerstone of the web. Don't be afraid of using them!

  • by kantapproves on 8/19/24, 8:48 AM

    Surprise, surprise. Let me be the contrarian: I dislike this attitude of dumbing everything down just because some people can't be bothered to learn how and why their tools work the way they do. They'll invoke "2024" like it means something. Not a great look IMO.

    The output of df and mount shows the truth as it is: raw and shitty. Don't dumb it down. Your version of usability might be my idea of a nightmare. I like the raw truth, ugly as it is. If I or anybody needs a `tiktok-disk-usage --fancy` we'll conjure one up. Are we tech or what?

    It is exceedingly easy to filter the output of said tools. Nothing to do with money or incentives. It is a completely solved "problem" for the people that need it and are capable of "solving" it. Maybe you should opt for a "desktop environment" that "manages" your stuff so you can have a nice set of disk percentage indicators? I hear good things about "Windows".

  • by bheadmaster on 8/19/24, 8:07 AM

    If your disk is mounted at root ("/"), which is the case of most default distro installs, you can run "df -h /" to get only your disk info:

        user@hostname:~$ df -h /
        Filesystem      Size  Used Avail Use% Mounted on
        /dev/sdc       1007G   49G  908G   6% /
  • by aetherspawn on 8/19/24, 7:21 AM

    Haha, try and expand a partition on Linux using command line. It's nearly impossible if you're not a sysadmin [1].

    You'll google it and find 10 different ways for 10 different distros, and most of them will require doing byte math (but you're not sure if KB is really kB and 1000 or 1024). If you get it wrong your computer blows up (probably).

    And if you think resizing was hard, try to defrag and shrink one!

    [1] For example if you install RHEL using wizard it will create a bunch of virtual logical areas that each have partitions allocated that each have disks allocated and if you want to resize them later you have to resize the onion all in the correct order.

  • by terryf on 8/19/24, 7:11 AM

    Good article content, but wow the article looks great! Really incredible!

    If by any chance someone knows the tools that were used to make the big-font subtitles (or the whole page?), enlightenment would be highly appreciated!

  • by langsoul-com on 8/19/24, 7:18 AM

    This is why I quite like Phpstorm over vscode.

    Yes, vscode and plugins can do everything. But Phpstorm integrates everything into one coherent package. Too many random directions is more annoying.

    In terms of software dev, it's quite hard to get a good app wide experience. There's just so many people working on the project. Without someone to make sure things are aligned, things fall apart into random wild patterns everywhere.

  • by teddyh on 8/19/24, 7:25 AM

    From my .bashrc:

      alias dfx='df -x nfs -x none -x smbfs -x tmpfs -x cifs -x tmpfs -x fuse.sshfs -x devtmpfs -x squashfs'
  • by dexen on 8/19/24, 8:14 AM

    Author states "i feel disrespected in my own ~home.". And funnily enough "~" is exactly what he's looking for:

        df -h ~
  • by noufalibrahim on 8/19/24, 7:25 AM

    UNIX : Everything is a file

    Linux : Everything is a filesystem

  • by atoav on 8/19/24, 7:29 AM

    From a design standpoint I like to highlight one rule: A good design is one where the most common action your users will take is priorized. If you get there alone, by basar, by comittee or whatever, doesn't change that. The problem with the latter variants is that decisions are not made on principles, they just happen.

    For example if the overwhelming majority of users use df to get an overview of how much disk space they are using and how much they have left, the default option should be giving you a easily digestable output of precisely that.

    I get that in terminal-land this can be a problem, as the default df command is now probably parsed by a thousand shell scripts and chaninging it breaks things. But that is also bad design: If there are hard reasons like that that could conceivable lock you into doing it a certain way, you should warn against it and offer a stable alternative (stderr: "The output of df -h is not meant to be machine readable, use df --machine instead"). Again frequency is the guide here. People will more often type df -h to manually check things than they have to write df --machine in a script.

    Same goes for the default output of ip a (which in my opinion should be more like ip -br -c a).

  • by therein on 8/19/24, 7:19 AM

    Output of mount and df are terrible indeed.

    The other day I took the output of df -h and gave fed it to an LLM, asking, anything stands out here? It helped.

    That being said, Claude turned no fun. [0] I remember back when ChatGPT first came out, I'd say `ssh root@mainframe.nsa.gov` and it came up with some interesting outputs.

    [0] https://i.imgur.com/a/ZzBxRcq.png

  • by hagbard_c on 8/19/24, 7:13 AM

    Hm, yes, well. Trainwreck design seems to be another term for 'design by natural evolution', more or less the way the literate apes which are responsible for these systems came about themselves. Just like we are full of odd design choices [1] so are our creations. We learn to deal with them as long as they do not cause egregious problems, otherwise we build something else which more fits the bill at that moment. The moment passes, things change and before long the fancy new replacement for that old piece of junk is getting crusty itself but a drop of oil here and a well-aimed slap there keep it functional so why bother, there's more important stuff to do. Disparate components of the Rube Goldberg contraption age at different times, some are patched and some are replaced entirely but the machine keeps running while that other team with their visionary leader finds out that the well thought-out design does not lend itself for crossing that chasm which the recent earthquake produced. While they are waiting for the right design to percolate up through the masses we added the bridge tool to the toolbox and kept it there just in case - it is a big box. Lo and behold, it came in handy quite often, who knew that a bridge could be used to walk from tree to tree through the jungle? And so it grows and grows, every now and then shedding some parts while gaining new ones. That is how it came about, just like how we came about. That is fine by me as one who is part of the motley crew of tinkerers who make it happen. Every now and then someone comes along with a vision of taming this mess, to give it a new facade, to bring order to the chaos, seemingly oblivious of the many corroding and overgrown remnants of previous attempts at taming the beast we passed along the way. I say let them try to tame it, maybe someone succeeds in breeding some nice and docile pet out of it some day which obeys your every command - only to find out it has lost the ability to fend for itself in times of trouble. Poor thing, another one bites the dust while the beast just keeps going and going, warts and all. In the end it is said only the cockroaches and tardigrades survive but rest assured, they'll have the beast right on their many heels.

    [1] We have inside-out retinas, why did we not get them the right way around just like squid have? Why can we not synthesize vitamin C? OK, we evolved somewhere where it was available on every tree but would those few extra genes have bothered us? The dog under the table has them, why not we?

  • by larodi on 8/19/24, 7:25 AM

    (most) Kids will likely never learn these command and attributes and output like we passionately did in 1994. LLMs be spittin' them command lines quick and correct, transpiled/translated from English/French/...Macedonian if you like. they already do, and it already helps a lot.

    Perhaps one may learn to remember <df> and <ls -a>, but will definitely not care to produce by heart oneliner bash abominations sprinkled with sygils and pipes and three-char cmd names.

    This whole article very true, but somewhat irrelevant to 2024. Claude/Mistral/CHatGPT been parsing outputs perfectly, and there are plenty of experiments into getting the LLM to assist code writing and parsing results directly from the cmdline. And you know what, this also works in 100% console mode, you don't need GUI to talk to the new GUI called LLM.

    the smaller models get, the sooner they get embedded in shells. then you'll get the real Ghost in the Shell, yeah...

  • by st_goliath on 8/19/24, 8:37 AM

    The year is 2024 and I want to know how much free disk space I have. I open the Thunar file browser on my Xfce desktop and it tells me "Free space: XXX GiB" right at the bottom.

    The year is 2024 and I need to give a presentation. I walk up, plug the HDMI cable into my laptop. On my Xfce desktop, a window pops open with 4 buttons: Laptop only, external display only, mirror, expand. I choose "mirror", the desktop is resized to the smallest common size and it "just works". Unlike the next person who has to futz around their Windows settings for a few minutes and afterwards asks me excitedly what that tool was that I used.

    Of course then there is also that one guy who fidgets around on stage for 10 solid minutes, before we are treated to a tiling window manager with eleventynine terminal windows and a hundred nervously fat-fingered xrandr command lines. Everyone in the audience chuckles and shakes their head "Linux people, typical...", and the guy on stage, already sweating blood begins the presentation.

    But I guess you just gotta have your command line and complain about it too.

  • by BenoitP on 8/19/24, 8:11 AM

    What about governance in The Hive? For Cathedral and Bazaar, it's simply the two opposite corners: control everything, or control nothing. Just like we use binary because it's the min and max of voltage: it's simple. We don't use intermediary voltages. It costs energy to maintain that.

    To align with the colorful analogies in the article, governance in The Hive is 'draw the rest of the fucking owl' here. Ahem, what is distributed consensus?

    I have quite a few ideas about that, but they remain to be tested (Define a voting pool, let everyone vote for everyone, run a PageRank, publish the top 20 Queen Bees, let singleton decisions be taken in Queen Bee committees, decay votes for renewal). Let's call it "Human Staking"? Surely some research has already been done about that.

  • by nox101 on 8/19/24, 8:34 AM

    this reminds me of a locale issue. When I ssh from Mac to Ubuntu 22.04 I get some error about LC_??? not being set. Looking for a solution lead me here

    https://askubuntu.com/questions/162391/how-do-i-fix-my-local...

    what sticks out to me is there is no definitive answer. every answer is different. I'd have to already know the correct answer to know the correct answer

    Further, I've never done anything out of the ordinary on either Ubuntu nor MacOS. Both are standard setups.

    How can it be 2024 and I'm running into issues like this?

  • by michaelteter on 8/19/24, 8:41 AM

    This is about like trying to ride the rails on just a pair of wheels and an axle, and the complaining that train rides are horrible in 2024.

    _obviously_ he's looking too low level. That's why there are layers, apps, tools, that ride above that low level and summarize it for different perspectives.

    We need the full information, mostly raw, at the low level. Then we can choose what to do with that information when presenting it to users.

  • by aumerle on 8/19/24, 7:13 AM

    Now, the OP has to remember, df -h -x tmpfs instead of df -h. The proper solution for this is to not have commands that are both meant for interactive and script usage. Then the defaults for their output can be changed over time to suit the evolving landscape. Or if you do want a single command for both have a --script flag that makes its output suitable for usage in scripts.
  • by benrutter on 8/19/24, 8:07 AM

    I love the idea of hive design. Any examples of large projects where it continues to be a principle?

    I can think of a load of small ones like Hare, Suckless tools, etc. But no big ones (not necessarily an argument against it working though- could just be me not knowing any)

  • by moffkalast on 8/19/24, 7:23 AM

    I mean... keeping the output of a small "load bearing" program that's been that way since the 80s and is being parsed by countless other scripts that rely on it being exactly the way it is is probably a good idea. Despite what the average library maintainer seems to think, it's far better to have a few people complain about it being meh then breaking half the internet because the output could be nicer.

    That said, anyone know of any good alternatives that parse it into something actually -human readable?

  • by igammarays on 8/19/24, 8:53 AM

    Yup and this is the reason I just use Apple devices. Google and Microsoft products are design-by-committee garbage, and most open source projects eventually devolve into a mess, unless it is tightly controlled by a single author (such as SQLite or Redis or even Laravel).

    People forget that Nature's default is to devolve to the chaos of the jungle (beautiful, but does not work toward any human purpose). The absolute best human designs are those controlled by benevolent dictatorships with a ruthless focus on simplicity. Nature's default is for every garden to overgrow with weeds, unless a gardener keeps at it relentlessly. Eventually the weeds become a beautiful jungle, but the absolute worst gardens are those designed my multiple competing gardeners. Either have 1 gardener, or 0.

    See also the incompetent clusterfuck that is the European Union.

  • by jml7c5 on 8/19/24, 8:01 AM

    The hive does not seem materially different than "the bazaar, but everyone agrees". What are examples that differentiate them?
  • by ploxiln on 8/19/24, 7:25 AM

    Just using the example of "df -h" and "mount" ... all the extra stuff that wasn't there 15 years ago, is from systemd. The idea is to auto-enable anything anyone might possibly want, to whatever extent possible, and I don't like it.

    I also noticed the /var/credentials/ mounts showing up recently; that's for a systemd feature that neither I nor you actually use, to set encrypted secrets for these services in a way that is exposed only to those services via a centralized framework. If you didn't explicitly use it, it's all empty. But it started years ago with the mounts for efivars, pstore, binfmt-misc, kernel/debug, kernel/security, etc. Sure they're useful sometimes, but they shouldn't be enabled until you have a need and then explicitly enable it. Well, that's my preference, so I always start with minimal debian or arch linux, but even on such minimal systems that have switched to systemd, you get all this stuff enabled and mounted by default.

    If you're actually using a tmpfs mount, like perhaps just one on /tmp, then you do want df to tell you how full it is. The problem is that you have 20 fs mounts that are truly useless to you, and IMHO should not be there. And ironically I think systemd developers do have a strong opinionated design vision, and if you don't like it you can pound sand (or use void or alpine for a desktop system I guess), because they have successfully taken over the vast majority of the desktop and server linux ecosystem. Anyway I still like linux for the flexibility I have elsewhere in the stack to make it work the way I want, reasonably conveniently for me.

    (Many would think I'm an idiot for not appreciating the brilliance and necessity of what systemd has done, but for a completely different angle about systemd I recommend: https://blog.darknedgy.net/technology/2020/05/02/0/ (seems tls cert expired a few days ago, but it's fine to ignore))

  • by ofrzeta on 8/19/24, 8:56 PM

    While I agree in principle here are some commands that help:

    - df -h /

    - ip -brief a s

    - mount -t ext4 (or whatever you usually are using)

  • by robertclaus on 8/14/24, 11:31 PM

    I think this is also interesting with respect to running a company or a more close-knit team.
  • by hinkley on 8/19/24, 7:07 AM

    I have been wondering about this more recently.

    I’ve filed bug fixes on a handful of projects and tracked open issues on quite a few, and the stream of inbound PRs is often so random. Not just bug fixes but new features. Where’s the plan? Whats the scope? Which of these PRs is likely to land? Can anyone but the maintainer guess?

  • by aktuel on 8/19/24, 7:15 AM

    The bouncing ball bounces way too soon.
  • by troupo on 8/19/24, 7:18 AM

    This is the bazaar version of enshittification. In that the software becomes worse for the user, but for different reasons than in the commercial world.

    In the end users lose anyway

  • by kreyenborgi on 8/19/24, 7:41 AM

    df -h .