Live data from Hacker News

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

sebastiano.tronto.net

191–200 of 385 posts

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

#191
post #189

Earlier quoted context omitted.

“Real alphabetical ordering” is incredibly nonspecific. It’s underspecified even for ASCII-US, but essentially meaningless for those of us in 2025 who need to handle Unicode. How do capital letters sort relative to lowercase letters? How do letters sort relative to digits? How do you consider code points that can correspond to different letters in different lettering systems with different ordering? How do you handle…

The issue at hand is how numbers are sorted. That has nothing to do with unicode.

Unicode has many different representations of digits, and I would dispute using the term “alphabetical” to refer to digit ordering in any case.

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

#192

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…

"The author's situation is extremely rare"

People sorting their files for alphabetical order is extremely rare?

And right now I fail to see even one 'case where someone wants "10" to be before "9"'

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

#193
post #192

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…

"The author's situation is extremely rare" People sorting their files for alphabetical order is extremely rare? And right now I fail to see even one 'case where someone wants "10" to be before "9"'

People sorting their files in alphabetical order but who want numerical values in their files to be sorted digit by digit instead of as numbers is the rare case.

I might go further in my ideal sorting algo which would be normalize capitalization and ignore all non-alphanumeric characters and treat them all as separators.

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

#195
post #48
post #39

To answer the question in the article, I’m pretty sure Windows Explorer (and probably File Manager before that) has sorted filenames this way for at least 30 years.

I can confirm that this does not happen in Windows 98, but does happen in Windows XP.

[deleted]

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

#196

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…

I will add that I'm plenty "smart" enough to understand that "10" comes before "9" in a strictly alphabetical sense, and I still want my file managers to sort "9" before "10".

I don't want to put leading zeroes before every all the single digit numbers in my file names. (And then potentially go come back later and add even more leading zeroes once the maximum number reaches three digits.)

---

I split all of my audiobooks into chapters. I use the format "Chapter 01.mp3" (or "Chapter 001.mp3" when there are > 99 chapters) because some (all?) MP3 players are too stupid to sort numbers properly and I want my audiobooks to work everywhere.

This works, but it looks kind of ugly and creates extra work—yes I have scripts to automate it, it's still an extra step—and it would be great if I could just trust that every device will understand numbers.

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

#198
post #143

Earlier quoted context omitted.

The sort rules are simple (1). Treat any consecutive sequence of digits as a number when sorting. So for example version numbers (which must be massively more common than decimals in filenames) work correctly, and 5.9 is indeed smaller than 5.10 and the latter is not identical to 5.1 . Given that this idea goes back more than two decades, has been the default behaviour of the most used OSes for many years, with no ma…

> The sort rules are simple In considering the simplicity of the rule, I think you're using a developers perspective here where we automatically classify numbers and have a clear mental model of the separation between value and representation. But I'm not sure how simple it would be to explain to a non-technical user why size_5, size_10 and size_15 are in order but size_0.25, size_0.5 and size_0.75 are out-of-order.…

> I'm regularly amazed at how little non-developer/technical users complain about strange and confusing behavior.

It reminds me of the recent article here titled something like "Altoids by the mouthful". We just get used to eating cat poop and we never realize it is not a good idea to eat cat poop, not that we should make it more palatable by chasing the cat poop by chewing Altoids by the mouthful.

Edit: for today's lucky ten thousand

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

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

#199

Earlier quoted context omitted.

> September is the equivalent of 9, October of 10. Which comes first for natural sorting? Remember, the file modify date may not be useful here since you may have wrapped up the September budget on October 1st while the prior edit to the October budget may have been on September 20th. The problem is that there is no such thing as natural Yeah, but there is such a thing as "give a predictable and consistent way I can…

Date is already in the metadata, it doesn't need to be in the filename.

Have you ever copied a file?

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

#200
Many commentors are positing the "clever" sort is what 99% of the user's want, but I really doubt it has been properly checked beyond the original PO's hunch and at most some user panel with pre-sampled data.

Most of these decisions are early default behaviors that stay there as long as users aren't clamoring for change, and TBH I can't imagine most users to have a self emerging strong opinion on how alphabetical sort should be working.

Post reply on HN