Live data from Hacker News

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

sebastiano.tronto.net

171–180 of 385 posts

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

#172
There's a Group Policy setting in Windows: Computer Configuration\Administrative Templates\Windows Components\File Explorer\Turn off numerical sorting in File Explorer Group Policy has so many essential settings I hurry to change with every isntall. I wish Windows would expose more of them to the user in ordinary settings.

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

#173
post #130

Earlier quoted context omitted.

Agreed.What's more, the idea that people learn to put leading zeros is wrong and impractical, unless you know in advance how many digits you need. When you go from version 5.9.17 to 5.10.0 you don't go back and relabel every existing folder as 5.09.17. The today standard way of sorting is well defined, unambiguous, and natural. Lexographic has its place, but user facing interfaces ain't it.

No Just no User interfaces that try to be cleaver are a pita. Keep it simple, and avoid the confusion with corner cases that otherwise will baffle users. Like this

LOL I can tell you don't have the experience of designing UI and shipping product to end users

> Keep it simple

What's simple? Good defaults make things simple, which means putting 9 before 10 in case, for the reason explained by parent.

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

#175
ls sorts filenames strictly lexicographically, comparing character by character, so e.g. "055436307" is compared as the characters "0", "5", "5", etc. so it sorts before "121134" because "0" is less than "1". if all compared characters match and one string ends, the shorter one comes first. Symbols like _ are just more characters, and their position relative to digits depends on the locale’s collation table.

Google Drive uses ICU collation with the numeric option enabled, which treats each consecutive sequence of digits inside the filename as an integer. so "055436307" is parsed as the number 55,436,307, while "121134" is parsed as 121,134. and since 121,134 < 55,436,307 then "121134..." comes before "055436307..." even though lexicographic order would suggest the opposite. and i think when two digit runs have the same numeric value, the shorter run comes first; if runs are equal and the string continues, then normal character comparison resumes, including any underscores or suffixes

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

#176
post #119

Maybe it's just me but I don't miss this at all: Image-1.jpg Image-11.jpg Image-2.jpg The only time natural sort bit me was with nonsensical names like .jpg

Nah that's not just you. That is an unnatural way to sort things because that's not how numbers are ordered. I remember when Windows changed to sorting numbers by their value and, despite my programmer brain finding it strange in a way, I was super happy to have files display in an order that actually made sense.

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

#177
post #132

Earlier quoted context omitted.

> Treat any consecutive sequence of digits as a number when sorting. Based on this description, I have no idea how the following would be sorted: • photo.jpg • photo1.jpg • photo01.jpg • photos.jpg

Does it matter? There's a user expectation that photo20.jpg comes after photo3.jpg. There's no user expectation around whether photo1.jpg or photo01.jpg comes first. Just like there's no user expectation around whether photo1.jpg or Photo1.jpg comes first. Users also don't have the slightest idea about what order punctuation gets sorted in. Just sort the things that matter in the way users expect (natural sort order)…

> There's a user expectation that photo20.jpg comes after photo3.jpg.

my user expectation is the opposite

i get what you're saying but it's not achievable in practice, at least not consistently

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

#178

The most irritating circumstance for this is looking for files named with a hash: 3ea4f... ... 97dce... ... 126b9... This is one of the settings I immediately turn off on Windows via the registry key mentioned in the other comments here. I miss the time when computers did what you told them to, instead of trying to read your mind. These days, it's more like "trying to change your mind". I absolutely hate the "the use…

Exactly. This is even more annoying when it isn't exactly a hash, but some gibberish you cannot really make sense of, which does have a numeric section in them: like a user ID, or unix time, or who knows what else it could be, but you are trying to visually find a file abcd89764237 somewhere after abcd683426834, and it isn't evident why you cannot, unit you notice that the latter has more digits in its "ID" for some reason.

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

#179
I'm often yelling at the software on my computer: "STOP TRYING TO HELP ME!"

It's like having a toddler help you make a meal. It wants to be involved and recognized so badly. Meanwhile I'm starving and just want to get the food done as quickly as is possible and I'm constantly tripping over this little ball of misguided efforts.

Please. Stop trying to be smarter than me. You often can't, and when you get it wrong, you make it measurably worse. If you insist on doing this please give me the "Expert Mode" setting back so I can flatly disable ALL OF IT with one click.

Post reply on HN