Live data from Hacker News

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

sebastiano.tronto.net

141–150 of 385 posts

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

#141

In Total Commander, there is a function in the options to sort strict by numerical char code. It will sort those files correctly. Unfortunately, it will also sort "10.txt" before "2.txt". --- In all file managers, I miss an API point where one can give a userdefined sorting function for the file and folder list.

What do you mean by "Unfortunately"? This appears to be the only correct conclusion from the algorithm you selected, you can't eat the cake and have it too.

Regarding your second point, that's not really what a graphical file manager is for, I think. At this point (likely even earlier) you would be better off just writing a simple script in the scripting language of your choice. (If going for something fancy, you could also implement a FUSE based on symlinks for the original files, where the filename is prepended by a sort key. This would work for every major file manager and you could manipulate the files in mostly the same way as before.)

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

#142
post #86

Earlier quoted context omitted.

> The problem is imposing it on the user with no warning or option to turn it off. You can say that about every single design decision made about every product. The gripe about this particular feature seems misplaced because almost all users will want the sort that's offered and the actual alphabetical sort is likely the desire of a more advanced user who, in fact, is offered a choice through registry editing and/or…

> You can say that about every single design decision made about every product. No, that's not true. Many aspects of my computer's UI are user-configurable.

Yes but not every single one of them

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

#143
post #60

Earlier quoted context omitted.

I'm not sure I agree. I think I could be convinced if there was a unique and universal representation for numeric values using characters. 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 nu…

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.

> with no major outcry

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

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

#144
The so-called "natural" sort makes sense for version numbers and enumeration (without zero-padding) but I'm more often dealing with file names with a datetime (like in the article), a hexadecimal hash, or just randomized string of characters that includes numbers. In those cases "natural" sort makes it harder to find the file you're looking for.

Even when files are enumerated it's pretty rare to have more than 9 parts and no zero-padding, whereas there are almost always multiple consecutive digits in the use cases for which "natural" sort is not a good fit for. It just feels like a bad default, at least for a programmer's workload.

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

#145

Earlier quoted context omitted.

It's not just the one decision though; there are literally thousands, maybe tens of thousands, of these decisions in most software. You want every single one of them to have an option? You want it to support every single combination? At some point, it is ridiculous. Sometimes you just have to decide how your software is going to work and not leave every single decision to the user.

It may be one of thousands of decisions, but it's one of a handful that are exposed in the user interface as a fundamental action.

In a file manager? Any more than the displayed thumbnails, icon size, whether folders are separated from files, whether images are separated from videos, what video types are supported, what file types are opened inline, what the click and double click behaviours are, etc?

And yeah kde has settings for all these but kde is also known for being too configurable.

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

#146
post #83

Earlier quoted context omitted.

Raymond Chen explained why a registry file is called a “hive”: Because one of the original developers of Windows NT hated bees. So the developer who was responsible for the registry snuck in as many bee references as he could. A registry file is called a “hive”, and registry data are stored in “cells”, which is what honeycombs are made of. https://devblogs.microsoft.com/oldnewthing/20030808-00/?p=42...

https://devblogs.microsoft.com/oldnewthing/20030808-00/?p=42...

Thanks for fixing the link!

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

#147

Earlier quoted context omitted.

Yes, sounds to me like the user really wanted to sort by time created. And got used to sorting alphabetically as a poor proxy for that.

When copying files from a device and then between systems, too often the dates get lost (shouldn't, but still...)

That only happens for the datetime metadata of the files (modified, created, access etc). The EXIF metadata will still remain the same.

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

#148
post #132

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…

> 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

I just tried it on Mac, its sorted in the order you listed. Extending it a bit, the order is:

photo1 photo01 photo001 photo0001 photo2

So the shorter representation of the same number comes first. It does make intuitive sense to me.

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

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

Lexicographic order is great when you need an unambiguous criterion that will work the same in every implementation; but you only need that for automated processing, i.e. for coding.

For user-facing presentation, having 5.9.xxx before 5.10.xxx is simpler; the corner case that baffles users is having 5.1 and 5.10 before 5.2.

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

#150

Earlier quoted context omitted.

I think the only problem is that it's a surprise and mystery, particularly because "dumb" alphabetical sort has existed forever. When they "fixed this" for the 99% of regular users cases, they should have made it as separate "smart natural sort" option separate from the "strict alphabetical sort" option (next to date, size, etc). Simple and obvious, rather than surprisingly different from the decades of experience th…

It's not just the one decision though; there are literally thousands, maybe tens of thousands, of these decisions in most software. You want every single one of them to have an option? You want it to support every single combination? At some point, it is ridiculous. Sometimes you just have to decide how your software is going to work and not leave every single decision to the user.

You don’t let every decision to the user, you make good defaults, but leave the option to override to the user! And thousands isn’t scary as long as groups/tags/search work, so what’s ridiculous about empowering the user?
Post reply on HN