RetroFed Forums
Your home away from modern life.
The Unix way and integration complexity
Post Reply
AuthorMessage
arty feddit.org arty@feddit.org
Joined: 2024-07-02
(edited) Quote

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?

17   Original
hendrik palaver.p3x.de hendrik@palaver.p3x.de
Joined: 2021-08-21
#2 · Quote Reply

On the other hand a programmer rarely knows exactly what I'm trying to accomplish. Do I want to count the characters in a textfile? Or the words? Do I want to sort the files by size? age? filename? And which of those am I trying to move? What if I want to delete all files older than 30 days which don't have the word "elephant" in them? I mean sure, you can implement all of that in a very complex program with a very convoluted user interface... Or you do it the Unix way and give me seperate (simple) tools to count, a tool to sort, search text... and a way to connect it to the delete tool.

8
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#3 · Quote Reply

On the other hand a programmer rarely knows exactly what I'm trying to accomplish. Do I want to count the characters in a textfile? Or the words? Do I want to sort the files by size? age? filename? And which of those am I trying to move? What if I want to delete all files older than 30 days which don't have the word "elephant" in them? I mean sure, you can implement all of that in a very comple...

Continuing the train of thought from the post: an approach that might serve you better is not a universal program that does everything. It is rather a custom program that does what you need. It very likely will apply reusable code, but in the form of modules instead of programs. It will be much easier to write well than to write a bash script well.

2
brainwashed feddit.org brainwashed@feddit.org
Joined: 2025-01-28
#4 · Quote Reply

I think the Unix way is a great ideal if you develop composable cli tools, functions or libraries. In each its easier to reason and recombine a thing, that does one specific thing. More complex user problems are then solved by combining multiple simpler components. Lots of modern graphical user interfaces neither think about what the user might want to do, just offering everything, nor prescribe a specific workflow, which just leaves users that have a only a vague idea of what they want to do or a porgram could do, confused.

Being more unixy would be great for mobile apps as well. iOS for example has these app shortcuts which expose functionality of an app to be combined with other apps featuers. I think once siri AI takes hold this could be done. I think, however, the monetization realities of most software will always pressure them to do lots of things and lock the user in.

8
thedeadwalking4242 lemmy.world thedeadwalking4242@lemmy.world
Joined: 2023-08-10
#5 · Quote Reply

I think a big portion of the unix philosophy is to be easy for development. Not for consumers or customers.

The idea is that it will be easier for developers more complex software and flexible software if the pieces they are working with are well defined.

6
banana_pie piefed.zip banana_pie@piefed.zip
Joined: 2026-10-22
#6 · Quote Reply

Unix is dead. Everyone ships RESTful services + web UI. Underlying platform doesn't make a difference. You could ship it on Windows server and no one would notice.

1
TrollAccount69 lemmy.ml TrollAccount69@lemmy.ml
Joined: 2026-08-10
#7 · Quote Reply

The Unix way isn’t for people who can’t integrate those tools.

Ever been in the drivers seat of an 18 wheeler? Even just getting into one requires more physical exertion than getting into your car. When you’re up there you have a million gauges and controls meant to provide the operator the tools they need for any situation they might encounter and to interface with a galaxy of stuff that can be hooked up to the back. You need a special license which encapsulates this different paradigm of use, operating a gigantic vehicle under much different and more variable conditions than the everyday driver (in addition to approaching normal road conditions and functions like turning left with a different outlook and awareness).

It’s why I often tell people not to switch to Linux. It’s not for them.

1
hendrik palaver.p3x.de hendrik@palaver.p3x.de
Joined: 2021-08-21
#8 · (edited) Quote Reply

Continuing the train of thought from the post: an approach that might serve you better is not a universal program that does everything. It is rather a custom program that does what you need. It very likely will apply reusable code, but in the form of modules instead of programs. It will be much easier to write well than to write a bash script well.

I mean that's basically the same thing, just a different user interface. I think from a technical perspective it doesn't matter a lot whether we write down the commands as text/words and connect them with "|" symbols or whether we pick them from a long list of symbols and arrange them as puzzle pieces or connect them with pipes or arrows drawn with the mouse.

2
hendrik palaver.p3x.de hendrik@palaver.p3x.de
Joined: 2021-08-21
#9 · (edited) Quote Reply

Unix is dead. Everyone ships RESTful services + web UI. Underlying platform doesn't make a difference. You could ship it on Windows server and no one would notice.

The programmers and ops would probably notice because it now takes ten times the effort to automate stuff and customize things for their clients. I mean there is a reason why Linux is the market leader for any kind of serious behind-the-scenes computer stuff. But yeah, there's enough abstraction layers in-between. The end-users would probably get pretty much the same service. Maybe at a slightly different price point. And it sometimes has an effect on IT infrastructure at work. You'd either get a more traditional workspace or Office365 and cloud only.

2
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#10 · Quote Reply

I mean that's basically the same thing, just a different user interface. I think from a technical perspective it doesn't matter a lot whether we write down the commands as text/words and connect them with "|" symbols or whether we pick them from a long list of symbols and arrange them as puzzle pieces or connect them with pipes or arrows drawn with the mouse.

In my experience, programming languages offer more control than just connecting inputs and outputs, and it’s easier to get right

3
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#11 · Quote Reply

I think a big portion of the unix philosophy is to be easy for development. Not for consumers or customers. The idea is that it will be easier for developers more complex software and flexible software if the pieces they are working with are well defined.

Well, my post describes the experience of a developer using these tools. "User" here is supposed to mean the person who combines tools to build a more complex piece of software.

0
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#12 · Quote Reply

Unix is dead. Everyone ships RESTful services + web UI. Underlying platform doesn't make a difference. You could ship it on Windows server and no one would notice.

Even if so, discussing dead things could be interesting as well 🦖️

1
BCsven lemmy.ca BCsven@lemmy.ca
Joined: 2023-06-17
#13 · Quote Reply

In one way it is a simpler task to fix a single tool, than update a bunch of complex tools that suffer a problem.

BUT this was before the GIT method of pulling changes into a main branch, so maybe nowadays it doesn't matter as much as their is much less effort updating a bunch of tools for a problem, than manually editing and recompiling.

Srill when we talk to users about our software use we alsways recommend using as much out of the box functions to get done what you need, rather than coding new tools for the Open API. Because a software update (should) fix all your workflow and automation that you have leveraged, rather than recoding dozens of apo addons.

1
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#14 · Quote Reply

The Unix way isn’t for people who can’t integrate those tools. Ever been in the drivers seat of an 18 wheeler? Even just getting into one requires more physical exertion than getting into your car. When you’re up there you have a million gauges and controls meant to provide the operator the tools they need for any situation they might encounter and to interface with a galaxy of stuff that can b...

I’ve been professionally developing software for two decades. I can integrate those tools. Still, I find it unnecessarily more difficult than integrating programming language modules. And adjusting my solution to use ready-made, well-integrated complex software is significantly easier, all while being more stable.

0
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#15 · Quote Reply

I think the Unix way is a great ideal if you develop composable cli tools, functions or libraries. In each its easier to reason and recombine a thing, that does one specific thing. More complex user problems are then solved by combining multiple simpler components. Lots of modern graphical user interfaces neither think about what the user might want to do, just offering everything, nor prescrib...

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.

-1
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#16 · Quote Reply

In one way it is a simpler task to fix a single tool, than update a bunch of complex tools that suffer a problem. BUT this was before the GIT method of pulling changes into a main branch, so maybe nowadays it doesn't matter as much as their is much less effort updating a bunch of tools for a problem, than manually editing and recompiling. Srill when we talk to users about our software use we al...

It would be interesting to compare the number of problems caused by buggy tools versus poor integration!

0
novafunc discuss.tchncs.de novafunc@discuss.tchncs.de
Joined: 2026-04-25
#17 · Quote Reply

In my experience, programming languages offer more control than just connecting inputs and outputs, and it’s easier to get right

And generally should be more efficient too. Bash and this unix-style tool calling was not designed for efficiency. Which is fine for most use cases, but should be avoided for tools you regular use.

To be more detailed, every time you call a program using bash, your bash program has to fork into two identical processes. Then all that work of forking is wasting as one of the forks then execs to replace itself with the program you called. And that happens with each tool called.

Using other programs, like Python, can more efficiently exec other programs without the same overhead of forking. And for longer running jobs, Python is much more efficient as it converts itself to bytecode, whereas bash is purely interpreted.

The main downside of Python is its longer time to start. So for simpler jobs, bash can be better.

3
non_burglar lemmy.world non_burglar@lemmy.world
Joined: 2023-06-16
#18 · Quote Reply

The UNIX philosophy does look like "do one thing and do it well", but it's really a means of working in such a way that one doesn't introduce scope creep to a point of Drupal.

6
arty feddit.org arty@feddit.org
Joined: 2024-07-02
#19 · Quote Reply

The UNIX philosophy does look like "do one thing and do it well", but it's really a means of working in such a way that one doesn't introduce scope creep to a point of Drupal.

Initially I had some words in the post about the philosophy opposing some other approaches, and I can guess that there were some Drupal-like examples at the time. Is it possible that the approach was taken to the extreme and the baby was spilled with the water?

0
jollyrogue lemmy.ml jollyrogue@lemmy.ml
Joined: 2021-07-21
#20 · Quote Reply

Well, my post describes the experience of a developer using these tools. "User" here is supposed to mean the person who combines tools to build a more complex piece of software.

Yeah, and Unix is built around the paradigm of letting people build the tools they need. People are supposed to be skilled in using the computer as a tool to accomplish tasks.

Originally, IT wasn’t a defined business function. Scientists, accountants, and others, were given access to compute resources, and they were expected to learn the tools to master their jobs. Part of that, was learning how to program the computers.

2
non_burglar lemmy.world non_burglar@lemmy.world
Joined: 2023-06-16
#21 · (edited) Quote Reply

Initially I had some words in the post about the philosophy opposing some other approaches, and I can guess that there were some Drupal-like examples at the time. Is it possible that the approach was taken to the extreme and the baby was spilled with the water?

Well, these things come in cycles. In the 90s everything had it's own tool, then tools like Drupal and WordPress, office and image editing suites came along... And we went back to using simpler tools with app stores. And then we got orchestration with K8s. And so on.

We're going through another a big change in software, and we'll see more. The big, complex swiss army knife software suites again.

1
jollyrogue lemmy.ml jollyrogue@lemmy.ml
Joined: 2021-07-21
#22 · Quote Reply

I think you’re missing the difference between professional software development and a QnD script thrown together to accomplish a task.

The UNIX philosophy is also related to The Agile Manifesto and “worse is better”.

People are supposed to have the power to solve their problems. Unix provides primitives and tools to people, and they are expected to learn enough to use the system. It’s from a very different time. Well before the “don’t make me think” crowd showed up.

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.

Now ignore all of the failure modes and edge cases except those that a script is going to directly run into, and that should simplify the requirements. This is “worse is better”.

Perl, Python, and Ruby are supposed to be approachable and easy to get started with. They were never supposed to be industrial programming languages like C, C++, Ada, Pascal, Java, etc., and what you’re noticing is the software industry not understanding there needs to be levels which address the different needs of people. Sometimes people need a simple tool, and not everyone needs to master the professional tool which takes two hours to set up and adjust.

The software industry destroying easy, simple to use software is another discussion.

5
Nik282000 lemmy.ca nik282000@lemmy.ca
Joined: 2023-08-22
#23 · Quote Reply

Qualification: I am a certified moron, I used nano as my IDE for 8 years because I did not know about VS code. I still structure my python like the qbasic I learned in school. I have never mastered object oriented thinking.

Write your scrips one chunk at a time, make them modular, make intermediate scripts if you have to, and have each part output a data structure that you nail down early in the project. Having a ass-load of little parts chained together means you can tweak or entirely replace tools at a later date without fucking the whole process.

If your project is a monolithic do-all be-all monster it means even the tiniest change involves reevaluating your entire codebase. You're giving yourself all the problems of cuckcoding with none of the time savings.

1
aliceitc lemmy.blahaj.zone CorrenteAlternata@lemmy.blahaj.zone
Joined: 2023-07-07
#24 · Quote Reply

I think you’re missing the difference between professional software development and a QnD script thrown together to accomplish a task. The UNIX philosophy is also related to The Agile Manifesto and “worse is better”. People are supposed to have the power to solve their problems. Unix provides primitives and tools to people, and they are expected to learn enough to use the system. It’s from a ve...

What does QnD mean here? Sorry if it's a stupid question, but I tried searching google and Wikipedia and got nothing relevant

1
TrollAccount69 lemmy.ml TrollAccount69@lemmy.ml
Joined: 2026-08-10
#25 · Quote Reply

I’ve been professionally developing software for two decades. I can integrate those tools. Still, I find it unnecessarily more difficult than integrating programming language modules. And adjusting my solution to use ready-made, well-integrated complex software is significantly easier, all while being more stable.

Okay. Build a weird farm use only modified v10 excursion with half the body removed and a gooseneck receiver welded on.

If you find it too limiting to tape together the standard utilities then do what your intro to programming class did when you learned c and write your own utilities and libraries, zip them up and store them on a cheap vps you can remember the ip or fqdn of and yank them down onto whatever system you happen to be on, pardon the turn of phrase, like a normal person.

The reason a particular style of pressure fitting is mandated by law to be used for hydraulic connections between cabs and trailers isn’t because it’s the most versatile, repairable or even most secure type but because its manual of operation is simple, straightforward and very importantly: excludes off label or dangerous uses.

An alternative to the standard utilities or Unix way is something you want because you think it will be easier and faster and more versatile. It might be that way for you. Combination wrenches tend to have the sizes and shapes they do to accommodate working around the spaces their size of fitting tends to be in and because the wrench snapping in half when you try to operate it with a breaker bar is the tools way of telling you to begin destructive removal of the fastener instead of continuing to pour pb blaster into it.

1
jollyrogue lemmy.ml jollyrogue@lemmy.ml
Joined: 2021-07-21
#26 · Quote Reply

What does QnD mean here? Sorry if it's a stupid question, but I tried searching google and Wikipedia and got nothing relevant

QnD is Quick ‘n Dirty.

Quickly thrown together with dirty code.

2
arran 🇦🇺 aussie.zone arran4@aussie.zone
Joined: 2023-09-23
#27 · Quote Reply

By making smaller tools you're allowing for a shell scripting distinction to exist where without it you would have a lot more specialized tools that do "more" but don't integrate well. Kind of like the webbrowser.

3
slacktoid lemmy.ml slacktoid@lemmy.ml
Joined: 2021-08-18
#28 · Quote Reply

Qualification: I am a certified moron, I used nano as my IDE for 8 years because I did not know about VS code. I still structure my python like the qbasic I learned in school. I have never mastered object oriented thinking. Write your scrips one chunk at a time, make them modular, make intermediate scripts if you have to, and have each part output a data structure that you nail down early in th...

Hey get a load of this guy says he can't "code" but then lays out (actual) practical advice for coding.

1
Nik282000 lemmy.ca nik282000@lemmy.ca
Joined: 2023-08-22
#29 · Quote Reply

Hey get a load of this guy says he can't "code" but then lays out (actual) practical advice for coding.

My github account is a warcrime, everything I know I have learned from running Debian, reading wiki's, and stealing code from stack overflow.

1
sudoer777 lemmy.ml sudoer777@lemmy.ml
Joined: 2021-02-18
#30 · (edited) Quote Reply

I like tools to be separated enough that I can do scripted/CLI calls with them through standard interfaces (as opposed to being a GUI/TUI monolith). All sorts of stuff can be done when tools output structured data like JSON that's easy to parse and manipulate, or being able to interact with DBus APIs or services in other ways.

What I don't like is when core tools try to be "smart" and reimplement things that other tools already do and end up making them more difficult to work with. Like package management, we already have Nix, Mise, and a billion other package managers, we don't need another one. And turning the compiler into a package manager (cough Typst, .NET) is just stupid. Also programs editing their own configuration files is annoying as well, I can edit them myself and I don't want them touching my edits, and if other people don't want to do that then maybe a custom interface could be put in a UI/add-on of some sort that's not part of the core tooling.

Also web browsers and web applications are close to bottom of the barrel in terms of scriptability. The stuff the Nix ecosystem had to do to make Firefox configurable is nightmarish and still janky, and Electron is an overall mess. Although with everyone wanting to make the programs work with AI agents now, maybe this will improve.

1
Post Reply
Back to top