Live data from Hacker News

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

sebastiano.tronto.net

21–30 of 385 posts

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

#21

When you get a bunch of files (let's say 1000+) without leading zeroes, this is a blessing. But I get the author's frustration, the expected behavior is not there, instead, he gets magical sorting that is wrong for his use case. I'm not sure what the ux should be, and maybe the algorithm here could be smarter, but it's a trade-off.

> the expected behavior is not there

The expected behaviour is ambiguous (and thus subjective). Older versions of windows shipped with alpha sort. New versions ship with natural alpha sort. According to the UX designers over at Microsoft (and surely the user feedback), natural sort _is_ the expected behaviour.

I certainly agree with natural sort being the expected behaviour too.

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

#22

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.

Yeah, exactly. The behavior described is actually very useful. The problem is imposing it on the user with no warning or option to turn it off.

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

#23
I thought this was pretty well known. E.g. the macOS Foundation library even exposes NSString.localizedStandardCompare() [1] which implements the sorting algorithm used by Finder, and should be used by any well-behaved macOS application. Windows uses StrCompareLogical [2].

[1] https://developer.apple.com/documentation/foundation/nsstrin...:)

[2] https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/...

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

#25
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

Author here - My surprise stems exactly from the fact that for the last few years I have exclusively managed my files via a the UNIX shell, which behaves in the classical way.

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

#27
post #22

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.

Yeah, exactly. The behavior described is actually very useful. The problem is imposing it on the user with no warning or option to turn it off.

Author here - I Agree both with you and with the parent's comment. Having two options in the "sort by menu" - like "Name (natural)" and "Name (strict)" or something - would have solved everything.

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

#28
this is an ID-10T PEBKAC ERR.

Not this keyboard not this chair, but the problem is with idiots between keyboards and chairs.

The author is not the ID10T it’s the other general users.

The author is intelligent enough to recognize that this is not alphabetical sort, but the term that they are looking for to describe the sort that they see in dolphin windows, google etc. is *lexical* sort, not alphabetical.

The engineering problem is ID10Tic not technical. How do you educate an illiterate public on what the difference between alphabetical and lexical sort is in practice?

You can’t, so you engineer around it and call lexical sort alphabetical.

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

#29
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 of trying to read your mind.

You may be looking at that time through rose-tinted glasses. I don't like when computers lie to me either, but "mind-reading" is really helpful in ways we take for granted, like autosave. Desktops can have an option to sort files truly alphabetically, but the more common case should always be the default; that's the definition of "intuitive".

* https://news.ycombinator.com/item?id=45404022#45405279

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

#30
Well, lots of interfaces don’t say “alphabetical” anymore, they say “name” or some variant, and then they can define it however they want, regardless or because of the frustration it causes users but not some other users which will now be inverted for long term-frustration averaged user experience.
Post reply on HN