When I say “alphabetical order”, I mean “alphabetical order”
51–60 of 385 posts
Re: When I say “alphabetical order”, I mean “alphabetical order”
#52Re: When I say “alphabetical order”, I mean “alphabetical order”
#53Usually preferable, except when not. Just like distinguishing between upper- and lowercase letters, and other misery.
Re: When I say “alphabetical order”, I mean “alphabetical order”
#54Did the author try "ls -v"? It would probably give the exact same order these file managers used.
Re: When I say “alphabetical order”, I mean “alphabetical order”
#55I think the algorithm is probably incorrect. A number starting with 0 should be treated lexically not numerically. Otherwise you have a situation where img_1_01.jpg and img_01_1.jpg does not have a complete ordering.
(Good) "natural sort" implementations generally have ways of handling ties like this. It's similar to the problem of case-insensitive sort over case sensitive sets.
Re: When I say “alphabetical order”, I mean “alphabetical order”
#56Re: When I say “alphabetical order”, I mean “alphabetical order”
#57Re: When I say “alphabetical order”, I mean “alphabetical order”
#58I got used to naming files/folders with leading zeros when I want them to be sorted alphabetically (for example payslips/invoices, etc). But I'm a tech guy, I know what does "alphabetically" mean in the tech world. And it probably is not what common folks mean when they think "alphabetically" outside the tech world. Edit: in fact, if I recall correctly, the proper term for this kind of sort (the one OP wants) is alph…
Re: When I say “alphabetical order”, I mean “alphabetical order”
#59I 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…
Re: When I say “alphabetical order”, I mean “alphabetical order”
#60I 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…
But we have so many textual representations of numeric values that I'm assuming the "mind-reading" goodness only works for a small subset. And the subset will be somewhat intuitive for developers but unlikely to be so for non-technical people.
For example, does the order handle numbers with fractions (decimal points)? If yes, does it require a at least one leading digit (zero)? Does a.12345 come before or after a.345?
Does it handle thousand separators? What about international thousand and decimal separators (e.g. Euro-style . for thousand separation and , for decimal separation).
Does it handle scientific notation?
If the answer is no to any of these questions, it's likely to lead to surprise/confusion.
It's like a feature request that initially sounds reasonable and useful but once you explore the requirements in detail you realize there are too many edge cases to be able to meet the request in a non-brittle way.