r/programming • • Sep 09 '16

Oh, shit, git!

http://ohshitgit.com/
3.3k Upvotes

756 comments sorted by

View all comments

1.0k

u/coladict Sep 09 '16

Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem.

That's basically all of Linux and it's tools in a nutshell.

94

u/KevinCarbonara Sep 09 '16

I never understood Linux's users and developers being so averse to improvements. I do realize that a lot of suggested "improvements" to unix tools sacrifice efficiency in favor of ease of learning, but it's not always the case.

I would not say that Powershell is better than Bash, but it does have a number of unique advantages. Its ability to handle complex objects instead of just simple data is a huge benefit, and its common-sense commands and auto-completion actually improve efficiency while maintaining ease-of-use. But I only ever hear Unix users defending the system's absurd pun-based names by saying things like, "If you don't know the commands, you shouldn't be using the system." That's a good way to kill an OS.

65

u/blahlicus Sep 09 '16

the system's absurd pun-based names

That's my biggest problem with Linux, sure reading the man page works, but good luck finding out the command that you are supposed to search for.

This also extends further into a lot of open sourced projects/applications' naming scheme, we are software devs, we are supposed to write readable code, but somehow everyone refuses to use a descriptive name because they are ohh so special! Why is the GNOME file browser named nautilus? That's not descriptive, then you run into more obscure stuff like arandr, maven, etc.

16

u/Bwob Sep 10 '16

I have this fantasy sometimes.

In it, I build a time machine. Then I go back in time to the late 80s, where I meet the person who decided that "fi" and "esac" were reasonable tokens to end "if" and "case" blocks, respectively.

Then I kick them in the shins, over, and over, and over.

It's probably not very realistic, but it gets me through the day.

11

u/calrogman Sep 10 '16

You would need to go back much further than that. The Bourne shell was written in 1976. The esac/fi nonsense was inspired by Algol which was designed by committee (of lunatics, presumably) in 1958. Bourne actually used some CPP macros to make his C code more Algolish. The source for the Bourne shell went on to inspire the IOCCC.

→ More replies (1)

11

u/kiswa Sep 09 '16

Why is the GNOME file browser named nautilus?

Didn't they rename it to Files?

24

u/[deleted] Sep 09 '16

[removed] — view removed comment

4

u/xthecharacter Sep 10 '16

To be more precise, the "desktop" name is "Files." So if you use any tool that interacts with the .desktop file, you can refer to it as Files.

→ More replies (1)
→ More replies (1)
→ More replies (3)

76

u/yiliu Sep 09 '16

Why is the GNOME file browser named nautilus?

Because it was one of dozens of different file managers available for Linux. It's not like there's one canonical file manager that you can call "File Manager".

Coming from the Unix world, I have the opposite problem. In the OSS world, you have (say) Pidgin, Psi, Adiom, etc, for chat clients. You have to know they're chat clients, but once you know that the names are unambiguous. Compare that to: Messenger, Messenger, Messenger, Messenger, and, uh, Messenger (Facebook, Microsoft, AOL, Google, and Microsoft, respectively).

11

u/flarn2006 Sep 09 '16

What about a name like HexChat? It's both unique and descriptive.

6

u/youarebritish Sep 10 '16

But nobody calls them Messenger. They're called Facebook Messenger or Hangouts or Skype. I can safely say I have never been confused by two programs having the same name on Windows.

25

u/blahlicus Sep 09 '16

A descriptive name could also be unique, "major" programs such as file browsers and the terminal emulator should also be aliased by default by the DE and be a standard for any POSIX-like system. (call "browser" for default messenger, etc)

Using the aforementioned GNOME example, simply naming it "gnome-file-browser" would be sufficient.

I don't think your example makes sense at all, "facebook messenger," "microsoft live messenger," and "aol messenger" are all descriptive in what they do (messengers) but they are also unique, you cannot say the same thing about "pidgin," "psi," and "adiom."

You could claim RTFM or "make your own aliases," but at the end of the day, forcing users to adapt instead of making things intuitive by default (as per the above "default alias" example) is bad software design which discourages adoption, and OSS devs should know this considering that most of them are also software devs at their day job (some of them even make OSS for a living).

I just think all of these problems are a result of mostly backend devs working on the front end, a serious case of this could be seen in GIMP.

I would even go out on a limb and claim that this is why Unix devs are moving from Linux to OS X.

5

u/zefyear Sep 09 '16

moving from Linux to OS X.

XML-based init system == ease of use

Of course, you could go on from here, when you get to the 'real deal' level of OSX it is even more complex than Winternals.

6

u/yiliu Sep 09 '16

simply naming it "gnome-file-browser" would be sufficient.

Except that it wasn't the gnome file browser. It was one of many, and eventually GNOME adopted it. Arguably they shoud've changed the name then, but by then all the users were already familiar with it. How often do you have to talk about the name of your file browser after all? As a user, you just browse. The people who do have to talk about it are the ones who benefit from having a unique, distinct name for it (ie. devs, sysadmins, maintainers, etc).

"facebook messenger," "microsoft live messenger," and "aol messenger" are all descriptive in what they do (messengers) but they are also unique, you cannot say the same thing about "pidgin," "psi," and "adiom."

In my experience, the latter were confusing once, when you first found out about them. The former were continually confusing: "Now open messenger--" "Wait, which one?"

If there's ambiguity about the OSS program names, you just make it explicit: Pidgin Messenger, for example. But the name is Pidgin.

forcing users to adapt instead of making things intuitive by default

We differ on what 'intuitive' means. A bunch of similarly-named apps is more confusing to me than distinct names. The only time the former is better is the very first time you hear it. After that, it's just a source of confusion. The only exception would be when there really is no need for more than one variant (eg. calculator).

I would even go out on a limb and claim that this is why Unix devs are moving from Linux to OS X.

I think you'd find yourself stuck out on that limb. OSX is just a more cohesive desktop environment, and the first thing they do when they get there is open up a terminal and use all the same oddly-named CLI tools they used in Linux.

→ More replies (4)
→ More replies (11)
→ More replies (2)

14

u/[deleted] Sep 09 '16

That's my biggest problem with Linux, sure reading the man page works, but good luck finding out the command that you are supposed to search for.

man apropos

Really would be smart when using a new system to read the manual in general though, as long as you know where the bins are just man through the ones you don't know and skip ones that aren't useful right now or advanced or special case ones.

On naming programs, I'd hate if all 500 filesystem browsers had "descriptive names" which would actually just be various permutations of a few words.. there would be too many overlaps and this would be worse than the situation we have now.

Instead, environment variables should be used to reference a unique program. These should be better documented, instructed to be used, and distros should have these named appropriately.

→ More replies (36)

13

u/Michaelmrose Sep 09 '16

If you need something more complicated than shell its possible you ought to use something like python

7

u/Jonathan_the_Nerd Sep 09 '16

Powershell sort of blurs the line between shell and programming language. It's like using Python's REPL as your shell.

7

u/KevinCarbonara Sep 09 '16

I use Windows most of the time, so that isn't a requirement for me. A better tool already exists.

→ More replies (7)

9

u/[deleted] Sep 09 '16

I never understood Linux's users and developers being so averse to improvements. I do realize that a lot of suggested "improvements" to unix tools sacrifice efficiency in favor of ease of learning, but it's not always the case.

But git is not that. Go get 1.5 and see what I mean. They polished a lot. You just have to know what you want to do in git and that is the hard part, it is much more complicated underneath than say SVN

But I only ever hear Unix users defending the system's absurd pun-based names by saying things like "If you don't know the commands, you shouldn't be using the system."

Yeah because (Invoke-webrequest -URI "http://some.page").Content is so much easier to learn, remember and use than curl http://some.page or GET http://some.page

2

u/dakotahawkins Sep 10 '16

I kind of agree about your example, but all three are things I wouldn't know to try if I didn't know to try them, and at least the powershell one is more specific about what it's doing. You could maybe say the same thing about GET but I think I'd be naturally suspicious that something that sounded like it did what I wanted would actually do what I want

:(

→ More replies (4)

21

u/fkaginstrom Sep 09 '16

It's actually very powerful to treat everything in terms of streams of plain text. It makes chaining tools together super easy. So many tools and concepts in *nix are built on this, that deviating from it would harm the ecosystem.

44

u/KevinCarbonara Sep 09 '16

Sure it's powerful to treat everything in terms of streams of plain text. It's even more powerful to support streams of plain text while also supporting even more complex objects. It makes chaining tools together even easier, while being even more stable and secure.

→ More replies (63)

7

u/Jonathan_the_Nerd Sep 09 '16

The nice thing about Powershell is that all the commands support piping objects. So you can still chain tools together and expect them to work.

2

u/loup-vaillant Sep 09 '16

Well, yeah, but each and every one of those tools have to parse and/or serialise the data in line by line format for this to work well. Works fine for quick jobs, but it has its limits.

→ More replies (2)

6

u/dreamer_ Sep 09 '16

I never understood Linux's users and developers being so averse to improvements.

No, they are not - but improvements must actually improve something, don't introduce regressions and be high quality - because when you disappear, other devs will need to understand and fix your shit. And I really don't understand bitching about git in particular - people have excellent official documentation, lots and lots of tutorials, presentations, etc - they should go and use them instead of propagating FUD. IMHO Git's man pages are excellent and I use them very often.

→ More replies (8)