Live data from Hacker News

When I say “alphabetical order”, I mean “alphabetical order”

sebastiano.tronto.net

31–40 of 385 posts

Re: When I say “alphabetical order”, I mean “alphabetical order”

#31

I almost always want the version-sorting that's being presented in this article, rather than an "alphabetical" sort. But on the other hand, it absolutely seems like a valid bug that this is presented as an "alphabetical" sort, rather than something like "alphabetic/numeric" or similar. In other words, a problem of labeling rather than one of sorting.

It’s not being presented as an alphabetical sort, though. The author assumed that sorting by name meant an alphabetical sort, but that’s not how it’s labeled.

Re: When I say “alphabetical order”, I mean “alphabetical order”

#32
> But 1 is smaller than 9, so file-10.txt should be first in alphabetical order. Everyone understands that, and soon people learn to put enough leading zeros if they want their files to stay sorted the way they like.

No. Not “everyone understands that”. Natural sort happens in real life and everyone understands that. Only those who understand ASCII — not the average user of graphical file managers — will deduce the reason for your definition of “alphabetical order”.

> Now that I know what the issue is, I can solve it by renaming the files with a consistent scheme.

Intensely ironic given the previous suggestion.

Re: When I say “alphabetical order”, I mean “alphabetical order”

#33

I almost always want the version-sorting that's being presented in this article, rather than an "alphabetical" sort. But on the other hand, it absolutely seems like a valid bug that this is presented as an "alphabetical" sort, rather than something like "alphabetic/numeric" or similar. In other words, a problem of labeling rather than one of sorting.

The term for the sort in the article is called lexical, but the problem is the people are stupid.

The average user does not know the difference between lexical and alphabetic sort

Re: When I say “alphabetical order”, I mean “alphabetical order”

#34

I agree with Microsoft/Google/KDE's order. The author's situation is extremely rare, and the situation where someone wants "10" to be before "9" is far more common. Moreover, desktops don't label this sorting "alphabetical" (E: and it would really be "lexicographic"*), they label it "by name" (an informal criteria), so technically they're not lying. > I miss the time when computers did what you told them to, instead…

You mean file9 before file10?

I have some beef with microsoft, that you can only change this at the Computer level, not per user (see registry key below). Also they call it natural sorting for users, but logical sorting internaly. Unify your termini!

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoStrCmpLogical"=dword:00000001

Re: When I say “alphabetical order”, I mean “alphabetical order”

#35
> Well, apparently all these operating systems have decided that no, users are too dumb and they cannot possibly understand what alphabetical order means. So when you ask them to sort your files alphabetically, they don’t. Instead, they decide that if some piece of the file name is a number, the real numerical value must be used.

Well, no. You don't actually ask them to sort in alphabetical order. You ask them to sort "by name", and that is up to their interpretation. And they choose the interpretation that (per their reasoning, and possibly some actual data) seems most likely to correspond to what the user wants.

Maybe future versions of those OSes will add a rule that says that if any of the number groups have leading zeros then it reverts back to actual alphabetic order. Or maybe they'll give you configurable options. (Maybe some of them already do.)

Re: When I say “alphabetical order”, I mean “alphabetical order”

#36

I agree with Microsoft/Google/KDE's order. The author's situation is extremely rare, and the situation where someone wants "10" to be before "9" is far more common. Moreover, desktops don't label this sorting "alphabetical" (E: and it would really be "lexicographic"*), they label it "by name" (an informal criteria), so technically they're not lying. > I miss the time when computers did what you told them to, instead…

You mean file9 before file10? I have some beef with microsoft, that you can only change this at the Computer level, not per user (see registry key below). Also they call it natural sorting for users, but logical sorting internaly. Unify your termini! [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoStrCmpLogical"=dword:00000001

To change it per user, set it in the user's hive instead of in the local machine hive (e.g. HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE)

Re: When I say “alphabetical order”, I mean “alphabetical order”

#37
post #17

Earlier quoted context omitted.

No the author is saying the opposite. They expect file9.txt to be after file10.txt, but it many modern operating systems, it isn’t!

Really, I do not know how I missed that :) I read it a couple of times to and I still thought he wanted it the other way. So my original comment kind of stands but in a opposite way. I have never see file_9.txt sorted before file_10.txt, I just tested it on OpenBSD and I got this, which I have always seen: $ ls|sort file_1.txt file_10.txt file_12.txt file_2.txt file_20.txt file_3.txt file_9.txt

[deleted]

Re: When I say “alphabetical order”, I mean “alphabetical order”

#38
> Of course, the user who named those files probably wants file-9.txt to come before file-10.txt. But 1 is smaller than 9, so file-10.txt should be first in alphabetical order. Everyone understands that, and soon people learn to put enough leading zeros if they want their files to stay sorted the way they like. Well, apparently all these operating systems have decided that no, users are too dumb and they cannot possibly understand what alphabetical order means. So when you ask them to sort your files alphabetically, they don’t. Instead, they decide that if some piece of the file name is a number, the real numerical value must be used.

I think there are many things wrong with your assessment of the situation.

First, where does it say in these file managers that they're sorting by alphabetical order? I see that you've specified that you want the files sorted by name, but I don't see that you've specified you want them sorted by name alphabetically. And what does "alphabetical sort" even mean when you're sorting characters which are not letters? What you mean is probably "lexicographical sort".

Second, you admit yourself that users probably want natural sort. Why would you expect these products to do the thing which they know users usually don't want by default? That just seems like bad design to me. They know users usually want natural sort, and you know users usually want natural sort, so why would you expect the default behaviour to be a lexicographical sort?

Third, just like how you've learned to work around the lack of natural sort in poorly designed products of years past by adding leading zeroes, you can just add trailing zeroes to get the lexicographical ordering that you want. Why do you seem to be implying that the latter is more user-hostile than the former? It doesn't make sense to me. A decision had to be made about what sort to use and they picked the one that most people want. Isn't that what we should be expecting in a product that caters to its users?

I see in other comments you've suggested that there should be a separate option for choosing between lexicographical sort and natural sort. But in the past, when lexicographical sort was the only option, why weren't you complaining about it being user-hostile to only have one option then? Why is it only when the default is something you're personally not used to that it warrants complaint? And where do we stop, do we have separate controls for every single sortable string field to determine whether it should be sorted lexicographically or naturally? Or just the name field? Don't you think that is going to lead to interface bloat?

Re: When I say “alphabetical order”, I mean “alphabetical order”

#40
This is reminding me of the whole "Worse is better" essay and debate:

https://news.ycombinator.com/item?id=27916370

The author wants the "worse" sort, one based on ASCII/Unicode codepoints, without any intelligence for numbers that 99% of GUI users want.

For their purposes, they've assumed something about the implementation, to the point that a convenience feature is actually a misfeature for them. But the author here is probably a developer, or close to one, so they do not represent the needs of most people using computers.

Understanding the target audience for your product results in very different design decisions. Better is better might be great for products, but worse is better is probably better for systems that need to grow and evolve.

Post reply on HN