Over the decades I’ve seen the praise and critique of the “Unix way”. I don’t remember reading about the aspect I’ll describe below. This might be a banality, and I haven’t invested much thought into it either. I’m just curious to hear your opinions.

At the core of the Unix way is that tools should do just one thing. Users very often need results that can only be achieved after doing several things. With only single-purpose tools at hand, users have to integrate them. In other words, the tool authors delegate integration to the users.

Here’s the idea I want to discuss. In programming languages, integrating various modules to achieve a goal is already a complex task because we often have to handle numerous failure modes and edge cases. In shell scripts this is much worse, since shells are more limited than programming languages. Writing a tool that does only one thing looks like avoiding the most complicated task. Which leads to a conclusion that the Unix way only works well in a rather small fraction of use cases; the majority of cases are better served by different approaches.

What do you think?

  • arty@feddit.orgOP
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    2 days ago

    More complex user problems are then solved by combining multiple simpler components.

    What I am trying to say is that this solution is very likely to be poor, not taking into account various failures and edge cases.

    • Joe@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      If those edge cases and failure modes don’t apply to the situation, then it’s a good thing. I’ve watched many engineers over the years invest hours in making clean and robust solutions for one-off tasks that could have been scripted in a few minutes and in a few lines of python/perl/ruby/bash. 🤷‍♂️

      • arty@feddit.orgOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        I mean one often thinks they don’t apply and then is surprised by breakage. Or worse: it goes unnoticed. How many problems have happened because someone hasn’t considered whitespace in filenames?

        • Joe@discuss.tchncs.de
          link
          fedilink
          arrow-up
          2
          ·
          2 days ago

          That old “rm -rf ./$datadir”, indeed. I used “shellcheck” for years to help catch the simple stuff… Back to the topic at hand: Ultimately we have personal goals, and we cannot rely on the author’s of other software to know and implement everything we want. Especially when it comes to UIs, it’s often a take it or leave it affair.

          In this respect, AI software development has been a boon. I’m increasingly creating software for myself in highly performant type-safe languages, using native APIs… If it’s more than a simple script (but also not too complex), modern LLMs are going to do a decent job, faster than I could do it (whereas before I often wouldn’t have started, due to limited time). I can mod an existing app that’s almost good enough, in order to scratch a personal itch. Or reimplement it from scratch in my preferred form. Small composable apps, tools, and libraries are perfect for this. And most importantly, I don’t have to slop up the Internet with my overly opinionated but perfect for me projects. 😉