Not always. There are objective criteria, such as orthogonality, size of the interface etc. that are very closely associated with the subjective impression of prettiness.
The grep and sed command for instance both use regular expressions. It would not be pretty of them to use different kinds of regular expressions: the effort I undertook to learn one command should be portable to the other. I was very happy to see how similar the two commands are. I was less happy to see that both grep and egrep existed, and to this day, I can't recall the differences of the top of my head.
Git on the other hand… What's up with being able to create a branch with both git branch and git checkout -b? That's… well, ugly. And it also means that millions of programmers will need to spend more time learning those commands. They will learn, but frankly, they shouldn't have to. I understand the need for short-cuts, but this is way overdone.
Well, there is a logic to it: those examples are all about generating an object file. There is something funny, though: I don't see any "-c" flag in your first example. It should be there to signal you want an object file, instead of a full executable. Did you forget it, or is it a genuine inconsistency with gcc?
I know what checkout -b is meant to do. The problem isn't that I can't remember what the command does. Man pages are enough for that. The problem isn't even that I can't remember how to create a branch, then move to it: 'cause if I can't remember the primary purpose of git branch and git checkout, I'm hopeless as a programmer.
There are two problems:
It's one more option to document. It takes visual space, it takes time to read, and it doesn't help when you want to read anything else.
It's surprising: checkout is supposed to have an effect on the working copy only. checkout -b also affects the repository.
I reckon it's not much. And I'm only a beginner, so this is the only example I can think of of the top of my head. But from the volume of complaints I hear about Git's user interface, I guess there are many other such examples. They add up.
You can fully use git as intended without ever doing "git checkout -b" ... that's the point. Sure it's odd that the checkout command can also create a branch but it's a useful shorthand since git is meant to be used with rapidly created branches.
You do not get my point. Even If I don't use that command it, that's a couple more lines in a documentation I often skim for other purposes. If it wasn't there, the rest would be that much easier to discover.
2
u/[deleted] Jun 19 '14
Ya but "pretty" is relative. The way I have my .bashrc setup is probably different than yours. That's kinda the upside of the unix philosophy.
I mean unless you want to "OBEY" and have everyones workstation look exactly the same ala MacOS or Windows...