9 ms·
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 com
by armchairhacker 1y ago
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 of trying to read your mind.
You may be looking at that time through rose-tinted glasses. I don't like when computers lie to me either, but "mind-reading" is really helpful in ways we take for granted, like autosave. Desktops can have an option to sort files truly alphabetically, but the more common case should always be the default; that's the definition of "intuitive".
* https://news.ycombinator.com/item?id=45404022#45405279 https://news.ycombinator.com/item?id=45404022#45405279
- zweifuss 1y agoYou mean file9 before file10? I have some beef with microsoft, that you can only change this at the Computer level, not per user (see registry key below). Also they call it natural sorting for users, but logical sorting internaly. Unify your termini! [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoStrCmpLogical"=dword:00000001
- nerdile 1y agoTo change it per user, set it in the user's hive instead of in the local machine hive (e.g. HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE)
- yegle 1y agoTIL they are called "hives". Windows Registry is an interesting thing. Even casual users have to interactive with it once or twice w/o fully understand it. https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives https://learn.microsoft.com/en-us/windows/win32/sysinfo/regi...
- bmm6o 1y agoI mean, if you're running regedit at all you are not a casual user.
- kens 1y agoRaymond 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=4294 https://devblogs.microsoft.com/oldnewthing/20030808-00/?p=42...
- williamjackson 1y agohttps://devblogs.microsoft.com/oldnewthing/20030808-00/?p=42943 https://devblogs.microsoft.com/oldnewthing/20030808-00/?p=42...
- kens 1y agoThanks for fixing the link!
- whycome 1y agoThe file sorting isn’t something relegated to niche users because of the prevalence of tv episode file name sorting (eg S01e01) and it has necessitated the leading zeroes to make it work properly with “alphabetical sorting”.
- queenkjuul 1y agoAnd that would sort correctly with both methods, though, especially when each "field" is delineated (e.g. Show.S0XE0Y.Episode.Name.HEVC.1080p.mkv)
- whycome 1y agoYou’re saying that files with s1e10 and s1e9 would place 9 first?
- derriz 1y agoI'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 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.
- queenkjuul 1y agoAre filenames likely to include those representations? I feel like probably not (can you even include commas in Windows filenames?) More to the point of the article--if you want things sorted by date, sort by date. I think most laypeople aren't looking at long CHAR1234_5678 filenames anyway, they're looking at thumbnails and dates.
- mulmen 1y ago> can you even include commas in Windows filenames? Yes. > Use any character in the current code page for a name, including Unicode characters and characters in the extended character set (128–255), except for the following: The following reserved characters: < (less than) > (greater than) : (colon) " (double quote) / (forward slash) \ (backslash) | (vertical bar or pipe) ? (question mark) * (asterisk) https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file?utm_source=chatgpt.com https://learn.microsoft.com/en-us/windows/win32/fileio/namin...
- derriz 1y agoThe most common date format used in Europe uses period separators so can often appear in filenames. Commas are probably more rare. Things like versions are often fractional like v1.3 or v1.11 and can appear embedded in filenames.
- raincole 1y agoBoth should be supported. Perhaps put the uncommon (true alphanumerical order) behind a nested menu or something. But the mind-reading-less option should be there.
- Denvercoder9 1y ago> Both should be supported. At least in KDE they are, and you can pick whether you want natural or alphabetical sorting (which has a case sensitive and insensitive variant).
- SkiFire13 1y ago> and the situation where someone wants "10" to be before "9" is far more common. I guess you mean "after"? Otherwise it seems to me you're agreeing with OP. > 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. FYI the more formal name for the "by name" order is "natural sort order".
- messe 1y ago> I guess you mean "after"? Otherwise it seems to me you're agreeing with OP. Depends on which direction you're sorting in, no?
- DrammBA 1y ago> Depends on which direction you're sorting in, no? In a vacuum: yes. In this particular case: no, because we have the article's context clarifying that we're talking about ascending order.
- mbreese 1y agoIt’s more confusing. I thought the article was correct when they said -10 coming before -9. Why? Because they were talking about the strict alphabetical sort. They are already prepending zeroes to force the comparison to be 10 vs 09. So, yes, they were talking about ascending order, but not natural ascending order, but ascii sorting order where 10 is before 9 because the comparison isn’t 9 vs 10, but 1 vs 9. It was only clear to me because I could guess where they were going. They were complaining about natural sort vs alphabetical sort, which is a case I’ve run into many times, so I could see the argument coming. The irony to me was that they were already altering how they named files to fit what they thought the computer wanted by prepending a zero to get a proper alphabetic sort. And even after that, some computers didn’t follow their idea of what it should be doing.
- coldtea 1y ago>You may be looking at that time through rose-tinted glasses. Nope, regarding what he talks about, the time was rose-tinted itself.
- Certhas 1y agoAgreed.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.
- worik 1y agoNo 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
- TuringTest 1y agoLexicographic 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.
- procaryote 1y agoSome (most) systems will sort 5.9 after 5.10 though, so if the user is baffled they'll need to learn it anyway. Adding a second way to do it kinda makes things worse
- rs186 1y agoLOL 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.
- whatevertrevor 1y agoHad this in the Beat Saber mod manager recently. The game released 1.40.10 and my mod manager suddenly thought that game went backwards from 1.40.9
- ploxiln 1y agoI 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 that even non-technical users already have.
- wvenable 1y agoIt'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.
- oneeyedpigeon 1y agoIt 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.
- scrollaway 1y agoIn 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.
- mcdonje 1y agoHow the files sort seems kinda important. It gets at the core behavior of the program. It's not something superficial like a default icon, which the user probably can change.
- eviks 1y ago
- deleted 1y ago[deleted]
- lesser-shadow 1y ago[dead]
- yndoendo 1y agoWhat is the reason to append a textual file name with a number? User Experience? They are magic numbers. Maybe a serial ID, date stamp with more magic, revision, release, ... Magic Number land has 10 > 9 in the above. 9 > 10 is only possible when removing the Magic Number and morph into mealiness text. At the moment I cannot think of any magic number where 9 > 10.
- gtowey 1y ago> I agree with Microsoft/Google/KDE's order. The author's situation is extremely rare... Even if that were a valid reason for making it the default behavior, the real issue is they don't even give you the option to have the lexically correct sort order. They just decided to give you something that's not accurate and that's all you get. A trend which is frustratingly, increasingly common. It's trivial to allow customization behind menus. But we rarely get that anymore. Especially for sandboxes devices like phones. It's a giant middle finger to users who want to actually use their devices as a tool, instead of simply a portal for more sales and marketing.
- lukan 1y ago"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"'
- Spivak 1y agoPeople 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.
- scbrg 1y ago> ignore all alphanumeric characters There's not much left to sort by then, is there?
- Spivak 1y agoGood catch! Fixed.
- bmn__ 1y agoWhat you vaguely outline has already been standardised in UTS #10. The algorithm is both based on prevailing user expectations and also has shaped them since the wide-spread adoption of implementations.
- Wowfunhappy 1y agoI 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.
- fsckboy 1y ago[flagged]
- marcosdumay 1y agoWell, that's not alphabetical order. It's great if DEs build this and give it a name. It's even better if they have a different one that deals with SI prefixes too. But it's not good if "alphabetical order" means that.
- pixl97 1y agoI mean, nine does come before ten in alphabetical order.
- pseudalopex 1y agoWhat desktop environment called this alphabetical?
- rlayton2 1y agoThis is a really important point - my file manager just says "Name" with sorting. So while its not perfectly defined, it doesn't make the promise of saying its alphabetical.
- kelnos 1y agoI agree with you, but I also agree with the author: the heuristic used to figure out the "natural" ordering here is broken; if you're going to "guess" at how to order things, you need to be more sophisticated than just "find a suffix that looks like a number and order by it".
- typpilol 1y agoHaven't people started calling this "natural" order or something?
- NedF 1y ago[flagged]
- n2d4 1y agoI 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.
- pdonis 1y ago> I agree with Microsoft/Google/KDE's order. I don't. I want string sorting to be string sorting. Filenames are strings. I wouldn't mind if there was an option to tell the file manager to do this "wrangle numbers out of strings and treat them as numbers" thing--so that I could turn that option off, and others who want that behavior could turn it on. But for this to be the default, without even a way to change it (except in Dolphin, it looks like)? That seems daft to me. Btw, I use Trinity Desktop, and I just verified that in TDE's version of Konqueror, the sorting of filenames is the same as for ls on the command line, e.g., 'item-10.txt' comes before 'item-9.txt'. Another good reason for me not to have switched to a more "modern" desktop. > The author's situation is extremely rare I don't think it is. But that's really beside the point. The computer is my tool. If it doesn't do what I want or expect it to do, it's a bad tool for me. And designers of tools shouldn't be making assumptions about how I want to use it. They should be giving me ways to tune it to how I want to use it. > "mind-reading" is really helpful in ways we take for granted, like autosave. I don't use autosave either. I don't want the computer to assume when I want to save a file. The computer is too stupid to know that.
- zapzupnz 1y agoI generally agree with your points (and love TDE) but > I don't use autosave either. I don't want the computer to assume when I want to save a file. The computer is too stupid to know that. That’s why, with auto save systems, you flag/name a version as your canonical save point. Rather like a video game, I’d rather have the autosaves and not need them, because I generally save the game myself, than not have them at all. A computer can be helpful and obedient at the same time, when it’s done correctly and puts the user in control.
- pdonis 1y ago> with auto save systems, you flag/name a version as your canonical save point. You mean each saved version is stored separately, like a version control system? A system like that would be fine (in fact I use version control all the time for this kind of thing). But that's often not how auto save is implemented; the auto save just clobbers the last version you saved. That's the kind I don't use.
- Lutger 1y ago"mind-reading" is a really an unfortunate term though. Every algorithm is a strict and consistent set of rules that tries to serve the needs of its users. No magic is ever involved. It is just that some users have conflicting needs and some sets of rules are more complex than others. So I think what this really is about is 'computer reading', the needs of some users to be able to predict with ease what the computer is going to do. Some people would rather be able to predict the computer doing something that they actually don't really need, and then make up for its shortcomings, than have something they feel they cannot predict and control, but is actually closer to what they want. This is a bit like the term magic. Any sufficiently complex algorithm may indistinguishable from mind-reading, but it's still an algorithm. Mind-reading, like magic, depends on us being able to understand or not, which is highly subjective. But both are misleading terms.
- alentred 1y agoMost of the time, as a regular user, I agree with having smarter ordering. And smarter all features for what its worth. Except when it doesn't work because of some corner case. In which case the "smart feature" becomes a kind of a leaky abstraction - now as a user I have to figure out how the machine works, so that I can trick into doing what I need. Give the user an option: have both "by name" lexicographic ordering, make it default by all means, but also provide a way to switch to an alphabetical order one for power users. Same applies to other features. It is disappointing that apps and even some Linux Desktops today take the flexibility away from users, in the name of usability. By all means, I like and benefit from all the smart features, and I want them and will keep the on by default, but leave me an option to do the simpler, dumber and more predictable things too, for the case when I need to fallback to it.
- Yizahi 1y agoHow is that right, when file explorer picks an arbitrary character in the middle(!) of the filename and sorts by it? Say, I have a file987name.txt and list5.txt, so sorting by name ascending a file explorer would for whatever reason decide to sort by fifth character, so that list5 would lower than file987name, because 5 is lower than 9, via some twisted logic. How is that normal in any way? Thankfully I'm using Total Commander and FastStone as a image organizer, neither of which have this bug in the sorting.
- detaro 1y ago... no file explorer behaves as you describe.
- Yizahi 1y agoThat was an analogy, to illustrate how the "intelligent guessing" of sorting looks weird as soon as any other character is ignored. PS: apparently FastStone also sorts "intelligently" :( , I didn't test it correctly the first time. Only Total Commander does sorting as expected.
- deleted 1y ago[deleted]