Live data from Hacker News

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

sebastiano.tronto.net

241–250 of 385 posts

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

#241

Earlier quoted context omitted.

I think it depends on the person. That order is exactly what I expect and want.

You prefer looking at photos in that weirdly particular shuffled order that isn't the order they were taken in?

The mistake is software which doesn't follow a recognized standard for date/time representation in its filenames. Ie, RFC 3339, ISO8601 or their union/intersection[1] (but preferably just ignore ISO8601 because its overcomplicated and RFC3339 is simpler and more intuitive).

In OP's examples, the filenames are YYYYMMDD_hhmmssssss, which is neither valid ISO8601 nor valid RFC 3999, as the former doesn't accept underscores (only 'T'), and the latter doesn't accept basic format dates (YYYYMMDD), only the equivalent of extended format (YYYY-MM-DD).

And if dates in file names simply used the extended format, the problem disappears. The lexical order is the natural order.

Alternatively, file managers that treat any digits as a number should be improved to recognize when a sequence of digits is not actually a number but a date/time, and order those chronologically. This might occasionally produce a few false positives, but I'd suspect it would be a rare occurrence.

[1]:https://ijmacd.github.io/rfc3339-iso8601/

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

#242
post #136

Earlier quoted context omitted.

It’s been about two thousand years since the number of months in a year has been increased. I don’t think we’re getting 88 new ones anytime soon.

> It’s been about two thousand years since the number of months in a year has been increased. What? What are you thinking of? The number of months in a year is always 12 or 13 in any calendar system because they start by reflecting the moon. If you mean the Christian calendar, it was fixed at 12 months to the year well over 2000 years ago. If you mean any calendar, it's probably been more like one year since the numb…

The ancient Romans claimed to have had a 10-month calendar [1], which is what I assume the reference is. Either that, or when month 6 got renamed August in honor of Emperor Augustus

[1] https://en.wikipedia.org/wiki/Roman_calendar#Legendary_10-mo...

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

#243

Earlier quoted context omitted.

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.

In fairness, sorting by name has, for many years, been an alphabetic sort. Doing a mixed alpha/numeric sort is a relatively new thing.

Natural sorting is relatively new in KDE. But in Windows since 2001.

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

#244
post #50
post #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 sor…

> And they choose the interpretation that (per their reasoning, and possibly some actual data) seems most likely to correspond to what the user wants. Yes, that make sense, but the problem is that this interpretation changed in the last 10 (15? 20?) years. It used to be that "by name" meant "by name, il alphabetical / lexicographical order" in pretty much every file manager.

Microsoft and Apple changed to natural order in 2001.

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

#245
post #156

Earlier quoted context omitted.

Obviously. All I'm saying is that this particular decision ought not to have been taken from the user. Real alphabetical order is not an unreasonable thing to want.

“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…

I thought it was pretty well-known that capital letter come before lower-case. I think it's punctuation, then numbers, then capital letters, then lower-case. At any rate, that's what textbook indices do (assuming I remember correctly).

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

#246

Earlier quoted context omitted.

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

Have you ever copied a file?

Yes, have you never edited the metadata? Also most filesystems these days preserve it when copied, e.g. my camera's EXFAT filesystem on an SD card gets the creation date preserved when I copy it to my PC or NAS, or between NAS & laptop later.

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

#247
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.…

> 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.

You don't have to explain it if the situation never comes up.

I'd bet 99.9% of computer users don't have any files which would trigger this edge case in a situation they would actually notice. Decimals just aren't that commonly used in this context, and even if you do have decimals the sorting will still work a lot of the time. For the remaining 0.5%, chalk it up to a bug.

I literally had to test this on my Mac just now because I never realized it was broken.

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

#248

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 agree with everything but the definition of intuitive; sometimes, the more common situation is less intuitive. An egregious example of this is "Close ad" buttons, which are intentionally placed unintuitively to direct the user to view the ad.

Your definition of "intuitive" would imply that innovation in intuition is impossible, which is evidently not true.

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

#249

Earlier quoted context omitted.

I think it depends on the person. That order is exactly what I expect and want.

You prefer looking at photos in that weirdly particular shuffled order that isn't the order they were taken in?

If I wanted to sort by date taken I would do just that using the EXIF data on them.

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

#250
Convenient-to-select settings should always include:

Sort:

   In Alphabetical Order
   In Alphanumeric Order
   In Alphabetic-Word Order
   In Right-Aligned Alphabetic Order
   Randomly
   Sometimes
   Never
   By Hash
   Very Fast
   In the Background
   In the Foreground
   In the Underground
   In the Cloud
   Yes
   With Bubbles
   No Strong Opinion
   Of
   On YYYY-MM-DD HH-MM-SS: [SELECT] Repeat: [SELECT]
   With Random Site Free Download Sort Extension: [SELECT]
   Let Facebook
   Emergency Backup Sort [SELECT]
   Who Sort?
Post reply on HN