Live data from Hacker News

Kernighan and Pike were right: Do one thing, and do it well

medium.com

231–240 of 256 posts

Re: Kernighan and Pike were right: Do one thing, and do it well

#231

Earlier quoted context omitted.

IMO the problem with the Unix model is not that it's been corrupted over time, but that it was fundamentally flawed from the start. I'm hardly the first to point this out, but sending around unstructured text makes doing some things inordinately hard (imagine writing a separate program to color ls's output, instead of having that as a flag) + going beyond pipes leads to the awful experience of programming in shell.

The Unix command line tools were designed to be usable in a lot of ad hoc situations. In an ad hoc situation, unstructured text is often what you have. So, to be usable for that, the command line tools had to be able to operate on unstructured text as input. That left two options - either also accept something structured as input, or accept only unstructured text as input. "Usable in an ad hoc situation" gets us back…

I mean people still use `ls` everyday so it in fact did win. We have super rich GUIs, REPLs, the start menu, live programming environments and notebooks, web browser file listing capability, the ability to build your own web app to list files visually anyway you want.

And yet everyone still uses `ls`.

Re: Kernighan and Pike were right: Do one thing, and do it well

#232
post #154

Earlier quoted context omitted.

Am I the only one who thinks that the term sounds far too general given the apparently narrow interpretation that's intended by it? When first seeing the word, it literally just sounded like it meant "the process of becoming shitty", and I never would have guessed that it was intended to be so specific. It seems unfortunate that the term was picked primarily for how evocative it is rather than for its clarity.

The En prefix means “causes to be”. Things can become shitty but “en” changes it to a deliberate act. Thus shitification is process of becoming shitty but enshitification is the act of making things shitty. So, it’s not as general a term as you are implying and definitely the usage in this article doesn’t make sense.

Why does "causes to be" necessarily imply intention? I don't think that's nearly as definitive as you're claiming.

> It’s not as general a term as you are implying

My point is that even if the term isn't "supposed" to be general it definitely sounds like that to a non-trivial number of people, which is why these sort of discussions crop up almost every time the term gets mentioned in comment threads on this site.

Re: Kernighan and Pike were right: Do one thing, and do it well

#233
post #154

Earlier quoted context omitted.

Am I the only one who thinks that the term sounds far too general given the apparently narrow interpretation that's intended by it? When first seeing the word, it literally just sounded like it meant "the process of becoming shitty", and I never would have guessed that it was intended to be so specific. It seems unfortunate that the term was picked primarily for how evocative it is rather than for its clarity.

It's a word I had not heard before this year. It's made-up. It's a Humpty-Dumpty word: it means what you want it to mean.

Sure, you can make up any new term and define it how you want, but people will carry expectations based on the word you pick; if I had been the first one to coin the term "enshittification" and defined it as "the process of making something better", pretty much everyone would be confused, and for good reason. The mismatch here isn't as severe, but almost every time I've seen the term mentioned in comments on this site there's a discussion in the replies litigating whether the usage of the term was correct, which is a tell-tale sign of there being inconsistent expectations around the meaning of a term.

As an aside, it's interesting that the phenomenon of expectations around the meaning of terms goes beyond obvious relationships to existing known words but even to the way a word sounds: https://en.wikipedia.org/wiki/Bouba/kiki_effect

Re: Kernighan and Pike were right: Do one thing, and do it well

#234

Earlier quoted context omitted.

Bash is already there. Also, if you really wanted something more powerful than Bash for a shell scripting context, Ruby or Perl would be a better fit.

is there something like copilot for CLI? Remembering endless switches is tiresome.

https://githubnext.com/projects/copilot-cli

Re: Kernighan and Pike were right: Do one thing, and do it well

#235

Earlier quoted context omitted.

It's still a failing of the Unix philosophy that people found it easier to add all these flags to ls than to string together a few "simple&composable" commands.

It's for the very simple reason that flags are more easily discoverable (with simply a couple of tab key presses I can iterate and see the list of most flags of most of the cli apps I use) than "whichever program amongst the 7362 executables with obscure names I apparently have in /usr/bin will do the thing I want"

I guess they could have implemented some of the flags as aliases or rather bash functions to a preset chain of invocations. The merging of flags would be difficult though.

There are many flags that change the behavior of the file system calls that would be made...such as getting additional information.

To support all the formatting commands, the piped output of `ls` would need to be very verbose and structured too...like json or something.

They had to draw boundaries of functionality at some point.

So the unix idea of "one thing" was probably defined a bit more vaguely or more end-user use case related. Convenience seemed to be king.

It would have be nicer if they could have added a shell-like pipe syntax to C (and designed the code in a more modular and stream-like way).

In the `ls` [source code][1] you can see simple blocks of steps like:

    if (!file_ignored(file)) {
      ...
      sort_files ();
      print_current_files ();
      clear_files ();   
    }
For example the `file_ignored` function in `ls` would have made a nice reusable library (with standardized configuration params) and a cli tool (with standardized flags).

Missed opportunity to unify the shell and C, but I guess SmallTalk was kicking around at that time which went a whole lot further.

It's funny that we are still very much lacking this unification...

We don't have a high-level interpreted language that can also perform well as a system's language.

New systems languages are popping up all the time, but they are more and more hardcore (looking at you Rust). They don't embrace any aspect of scriptability.

The best effort I can think of is https://www.modular.com/.

Surely though, a native TypeScript-based language is the way. It by far has the nicest syntax out of the popular scripting languages today.

We have come so close...like with Dart...but still everyone seems to be avoiding the inevitability.

[1]: https://github.com/wertarbyte/coreutils/blob/master/src/ls.c

Re: Kernighan and Pike were right: Do one thing, and do it well

#236

" The model [Unix Philosophy] never successfully made the jump to desktop operating systems. So popular modern programs like Photoshop and Word are about as “encrusted with dubious features” " You export your phtoshop design as a .png file and you import it into word. There you go. Windowed desktop programs like Photoshop and Word do offer interoperability, in the form of files. (Which by the way is another way progr…

> You export your phtoshop design as a .png file and you import it into word. There you go. > Windowed desktop programs like Photoshop and Word do offer interoperability, in the form of files.

I think you are comparing apples and oranges here. Maybe if Photoshop and MS Word used the same dedicated underlying binary/application to read and process the png, then maybe it would follow the UNIX philosophy a bit closer?

Re: Kernighan and Pike were right: Do one thing, and do it well

#237
post #173
post #159

Earlier quoted context omitted.

That is because of the "lawsuite", unless you are referring to the 80s. Back then, Companies and Colleges were the ones who got UNIX. Companies went with AT&T, and IIRC Colleges when with BSD. So AT&T won out due to better financial backing and maybe a possible threat of AT&T going after BSD.

Well, Linux is 30 now. The lawsuite was settled quite long ago, wasn’t it?

You did not specify a timeline. The book was written in 1984, BSD existed then and the only other UNIX was AT&T. Linux was not even a dream in 1984.

Re: Kernighan and Pike were right: Do one thing, and do it well

#238

> Big monolithic apps have large codebases that slow down development velocity. They’re slower to compile, harder to test, and full of dark corners where bugs can lurk and multiply. A bad change to one part of a codebase can cause headaches for an entire building’s worth of developers, tanking productivity for hours or days. This has NOTHING to do with monoliths. If you cannot architect a monolith, you’re going to ha…

A monolith has more engineers working on it though and chances are some of them won't be great.

In the end the code needs to be written. What is better, parts of a monolith being shitty, or a subset of the microservices being shitty?

Re: Kernighan and Pike were right: Do one thing, and do it well

#239

Earlier quoted context omitted.

The Unix command line tools were designed to be usable in a lot of ad hoc situations. In an ad hoc situation, unstructured text is often what you have. So, to be usable for that, the command line tools had to be able to operate on unstructured text as input. That left two options - either also accept something structured as input, or accept only unstructured text as input. "Usable in an ad hoc situation" gets us back…

I mean people still use `ls` everyday so it in fact did win. We have super rich GUIs, REPLs, the start menu, live programming environments and notebooks, web browser file listing capability, the ability to build your own web app to list files visually anyway you want. And yet everyone still uses `ls`.

I think that most people who need ls's functionality (listing files in a directory) use a GUI application.

Re: Kernighan and Pike were right: Do one thing, and do it well

#240
post #101
post #87

Earlier quoted context omitted.

Micro services don’t solve any of those either.

What specifically do they not solve? Because in this thread we're, very specifically, discussing isolating the well maintained monolith from risky product produced by consultants, which microservices absolutely do solve.

Any of the problems above.

If you have a problem with bad consultants then solve that. Trying to solve it by jumping into microservices you will just have bad consultants writing your microservices equally badly, or even worse.

Post reply on HN