Hacker Newsnew | past | comments | ask | show | jobs | submit | vedantroy's commentslogin

Does anyone know why Bash has low usability?

It seems like Bash has tons of footguns and unintuitive syntax. Is this just because the language grew organically?


This reminds me of my `jsmv` tool, which I use for manipulating the file-system in place of Bash / find:

https://github.com/vedantroy/jsmv


That last statement was very bold. Do you think there is a direct link between open-sourcing this library and increased telemetry? What about VSCode and increased telemetry?


I think the intent was not stating a connection but just a old vs new pros and cons.


"It's common among people who think Javascript is a serious language".

I can't tell if you think JS is not a serious programming language.


I don't understand the desire for terse code, it makes things harder to read.

I also think Typescript makes the right tradeoffs, yes it may not have a Haskell-level type system, but in return, it has amazing integration with JS code and existing libraries, and no runtime.

As a side note, coming from someone whose previous exposure to type systems was Java and Kotlin, Typescript seems to have a pretty powerful type system. Yes, it may not have some/many Haskell-level features but I question whether those would have been necessary in the first place. At some point a more rigorous type system must stop generating value, otherwise we would all be using coq.


I think the larger issue is that shell scripts are intrinsically bad for writing readable code.

Consider the "cut" line in the shell script vs the "map" line in the JS script. The map line is easy to understand because it uses a chain of simple functions (map, split, array access, and lastly trim). The "cut" line has to cram all of this functionality into a few command line arguments instead of composing basic building blocks together.

I mean look at this: What does "only delimited" mean, what does "fields" mean, I might just be an illiterate boor but I don't remember what delimiter means off the top of my head (something like seperator, I assume).

cut --only-delimited --fields 2 --delimiter '|'

The JavaScript version is easier to read because it uses fundamental building blocks in the language that are

1. Super intuitive. (Split seems pretty easy to understand, especially when you know the input is a string, similarly everyone knows [1] means array access).

2. Widespread. You have probably encountered all of those JS functions before, I'd say the chance of encountering the "cut" utility is a bit less.

Summary: Shell just fundamentally sucks because it outsources a lot of functionality to various executables, each which have their own command line arguments. The ideal method is to use a programming language with consistent, composable, building blocks.


I am not a rust expert, but I assume the recent many programming languages have a keyword for function declaration is so that functions can be first class objects.


Sometimes I feel like I'm forced to take verbatim notes on my computer, even though I know that's bad for my learning.

Specifically, I'm reading a very detailed textbook on databases. I feel that if I don't take notes I will forget most of the content in the textbook because the textbook is so information dense, but at the same time, whenever I take notes they end up being word-for-word copies of the text because the textbook is already so concise/word-efficient.


Most of the time, I don't see an issue with non-native looking UIs. Oftentimes, non-native UIs look better.

VSCode and Atom both look great and they're non-native. I also think Slack looks pretty good too. Except for MacOS, native UI widgets generally seem to be pretty ugly.

Even Microsoft is embracing non-native UI for its own Microsoft Office platform.

Web-apps/material design, look sexy.


> Most of the time, I don't see an issue with non-native looking UIs. Oftentimes, non-native UIs look better.

I think there's a threshold for this.

Throw 1 or 2 non-native designs (and UX) at me, I'm fine. I'll appreciate the aesthetics. Make every app have its own UX/design and I'm going to get lost very easily.

And there's a hidden context switch cost there that can accumulate.


Microsoft has never had a consistent look and feel across its suite of applications. Windows Live Mail, Zune media player, Windows media player, the Office suite, etc all looked different and they all looked different than other Microsoft applications.


Microsoft doesn’t even have a consistent look and feel within its operating system. Windows 8 forward has been an inconsistent mess of a half implemented tablet interface.


Microsoft has never had a consistent look and feel across consumer applications. The business applications are highly consistent.


Microsoft Teams, Skype, VS Code, Internet Explorer, System Center. Not sure you could argue these are non-business applications, and none of them seem very consistent to me.


Amusingly, Skype looked much more native before MS bought it out and redesigned everything.


Interesting point, but that wasn't my experience. The office suite was consistent, but SharePoint differed markedly (at least in ~2010 when I last used it). IIS was different yet. I'm trying to think of other business-oriented MS products that I used (it's been a while)...


Out of curiosity, why doesn't the stack layout use flexbox? It seems like flexbox is the perfect fit for such a layout.


Margins of flex child elements won't collapse automatically like regular elements. It can be solved but it would be unnecessarily complex for the simplicity of the layout.


Because it's a just a simple stack. The intent is concistent margins between siblings within the wrapper. What came to mind were paragraphs. Or perhaps images. Or both?


If other browsers besides Firefox add support for the gap property, Flexbox will be perfect for this. The owl approach has some subtle issues, like not taking into account elements which show/hide based on breakpoint.


Pardon my naivete, but wouldn't stack be just a list of divs?


Display: block fits better because it has been around for more than 15 years unlike flexbox. And flexbox has no advantages in this case.


Flex is great for one directional layout within a box. It is not great for two dimensions which most layout is concerned with.


The stack is not two dimensional.


Has nothing to do with what we're talking about.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: