Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe before starting to teach others, you should teach yourself how to cleanly package your software into OS packages, instead of peddling around MS-DOS style shell scripts with a .sh extension. Didn't anybody teach you that UNIX-like operating systems purposely do not use extensions, in order to abstract the implementation language of the executable from the user?

How the hell are you going to properly teach others, if you have such knowledge gaps yourselves?

It's blind leading the blind again; boy does this make me mad.



I (25 years working with GNU/Linux) usually name my bash scripts `something.sh`. I think it's debatable wether it's always good or bad, and when specifically it can be a good idea to leave out the `.sh`.

Also, it doesn't look like you looked into the game and came out with some conclusions. It looks more like you superficially had a look, you had a thougt and rushed to comment here about what you believe is a deadly sin. I personally never enjoy this kind of comment, as there's not much thought behind them.

I tried it (before recommending to a teammate) and I also noticed some things that could be improved. But it never crossed my mind to post a judgement on the project after trying it out for just five minutes.


[flagged]


It may benefit you to read the HN Guidelines: https://news.ycombinator.com/newsguidelines.html, specifically the "In Comments" section.

> Be kind. Don't be snarky. Have curious conversation; don't cross-examine. Please don't fulminate. Please don't sneer, including at the rest of the community.


It does not benefit me: you mistake niceness for kindness. There is little I can learn from you and your guideliness when you yourself cannot tell which is which.


It seems like you are teaching others how to teach. Is that your area of expertise?


I'm glad you're mad, but based on this comment and the rest of your comments in this thread it seems that's just your normal operating state. Your argument seems to be that unless someone uses a computer exactly as you do, and has your exact selection of knowledge in their brain, then they're incapable of sharing any knowledge at all. Furthermore, there aren't many Unix/Linux users that operate in a vacuum, and often you'll be using files with extensions that come from other OSes that use extensions; and additionally, file extensions are a useful fast way of knowing exactly what kind of data the file contains. You're a mega idiot who deserves to be constantly seething


Thank goodness that all the many people I've learned from over my life didn't have to meet some arbitrary gold standard of knowledge before they were allowed to teach me! Hardly anyone could have ever taught me anything by this standard.

Similarly, thank goodness I've had the opportunity to expand and solidify my own knowledge by teaching people things I knew, even if I wasn't sure of all the details. I can't count the number of times I've had to stop mid-explanation and say "wait a second, that thing I just said doesn't really make sense. Let's take a deeper look and figure it out together."



I'm sure you'll be wholeheartedly welcomed if you submit a push request to fix this heretical use of suffix!


I'm confused as to why you're choosing this hill to die on.

I also use ".sh" at the end of bash script files for usability: at a glance it's obvious how run "build.sh" and exactly what it does without the person building it having to read a readme or an email that you authoritatively sent months ago regarding the optional build processes.


I find the use of a 'sh' file suffix a useful convention to follow in helping identifying what is an isn't a shell script on my local machine


You are not supposed to "identify" anything on UNIX-like operating systems; that is what the file(1) command is for, specifically, especially so since the entire concept of UNIX is that everything is a stream of bytes.

Attempting to manually manage files in this way defeats the purpose of the OS abstracting it away for the user; and the users of your executable should not have to care what your executable is written in because you grew up on a PC-bucket whose operating system stems from CP/M -> MS-DOS!


As someone who did grow up on Windows and still uses it regularly alongside Linux, I want to respond to this comment just to play the Devil's advocate (i.e. infuriate you).

> especially so since the entire concept of UNIX is that everything is a stream of bytes.

I consider this an archaic, anachronistic, ancient, outdated, primitive (they all mean the same thing; I just used a thesaurus to really drive home my point) file model. While it made sense for the limited computers of the early 1970s, it is extremely hobbling today and the fact that no one really complains about it is... quite astounding. If every file is merely a bag of bytes, then every native program shall have its own file-parsing/byte-parsing routine. What a waste of effort, writing and rewriting parsers over and over again.

The fact that one has to write a shell script that is interpreted, and itself calls not one, but three other binaries (cat, grep, awk) with arcane, not-easily-remembered flags just to extract out certain words in the last several lines of a file is... ridiculous. That you have to call 'file' instead of directly querying the OS or shell for file attributes is farcical. Consider PowerShell or Python as alternatives to shell scripting. In the former, the entire .NET library is available; in the latter, the default libraries may be imported as one sees fit, and additional libraries are available online.

> defeats the purpose of the OS abstracting it away for the user

The UNIX philosophy does a poor job of 'abstracting it away from the user'. For well-abstracted OSes, see any smartphone today (especially iPhones).

Furthermore, not every UNIX/Linux user interacts with their computer solely over the command line; I use KDE Plasma, for instance. In general, when I see a file on Linux with no extension, I expect it to be a binary; I am surprised when it is, in fact, a shell script.


This is a fantastic response, honestly. I'll add that your last point about how different users interact with their systems differently is especially relevant for the longevity of open operating systems. General users coming over to Linux who do not have extensive knowledge with computers beyond Windows will primarily be using graphical interfaces on their desktop, and making that process confusing for them by not accommodating that will quickly make them give up on the whole thing. If we wish to keep the software alive with a userbas then it's actually extremely important to allow and support things like this that are more intuitive.


> boy does this make me mad.

I'm not sure that I can add much beyond what's already been said in reply, but I do want to say:

If something this (arguably) trivial does, truly, make you mad, I would encourage you to reflect on _why_ and perhaps talk it over with a friend or colleague.


that's a pretty toxic attitude you have there...


I read the post with a Christopher Lee villain voice which made it entertaining.




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

Search: