5 ms·
I 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 "
by Wowfunhappy 1y ago
I 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.
- AdieuToLogic 1y ago> I don't want to put leading zeroes before every all the single digit numbers in my file names. > ... it would be great if I could just trust that every device will understand numbers. Strings are not numbers, even if some part of their content "looks like a number." > I 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". Problem is, this is your preference for a specific situation. Which may not be another person's preference in the same situation nor yours in a different situation. So what are programs to do? Display strings in a consistent, documented, manner. Which is lexicographical ordering in all cases lacking meta-data to indicate otherwise.
- Wowfunhappy 1y ago> Display strings in a consistent, documented, manner. IMO, "Treat any sequence of digits as a number for the purpose of sorting" is consistent. I'm not sure if it's documented—I've never needed to look up the documentation—but if it's not, the developers could certainly fix that. > this is your preference for a specific situation. Sure, but we generally make decisions based on which situations we think will be most common. I think having ten or more things (screenshots, audio samples, whatever) named "Thing 1" – "Thing 10" in a folder is extremely common. And if Thing 10 comes before 9, it's really annoying! Let's say I have a directory of 32 numbered files. Under the author's preferred sorting method, they'll get displayed: 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 31 32 4 5 6 7 8 9 If I download a folder with files like this, I basically have to pause whatever I'm doing and edit the files to have leading zeroes before I can make sense of what I'm looking at.
- AdieuToLogic 1y ago> IMO, "Treat any sequence of digits as a number for the purpose of sorting" is consistent. Are you sure about that? So how do you suggest handling hexadecimal numbers? Or octal numbers? What about binary numbers? What about file names with portions of a date and/or time? How is a program supposed to know any of the above? > Let's say I have a directory of 32 numbered files. Assuming any of the filesystems I am aware of is in use, those names are strings having one or two characters. They are not "numbered files."
- sandreas 1y ago> I 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". Amen. > 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. Well, some car and kitchen radio manufacturers will probably never get this right. In my car (which tends not to be brand new) they even messed up UTF-8 chars, which gets me laughing every time a track has them. It's become a running gag with my wife, "Oh, listen up, it's &%=?! again". > (all?) Well, I kind of hate to say this, but Apple got this right with the iPods. They even regarded the metadata fields `sort-*` (e.g. sort-album), movement-name (for series) and movement-index (for part). With these fields they really group and sort my audio books as I expect it to be. I even wrote my own software to fill these tags appropriately, so that I don't need to split my audio books. I'm pretty happy using `m4b` files - an mp4 / m4a container with chapter support, which is supported perfectly fine on my iPod Nano 7g and my Android Phone (using Audiobookshelf[1] and Voice[2]). After all these years, the iPod Nano 7g to me is the PERFECT portable audio book player with 2 exceptions: Repairability and the proprietary Apple headphone remote protocol [3]. 1: https://audiobookshelf.org https://audiobookshelf.org 2: https://github.com/PaulWoitaschek/Voice https://github.com/PaulWoitaschek/Voice 3: https://tinymicros.com/wiki/Apple_iPod_Remote_Protocol https://tinymicros.com/wiki/Apple_iPod_Remote_Protocol
- Wowfunhappy 1y agoThere’s a couple of reasons I don’t use m4b files: - A lot of my audiobooks come as mp3, and converting to m4b (which is AAC based) would mean loosing quality. - Some MP3 players (even those that support AAC) don’t support M4B. - I want playback to stop automatically at the end of a chapter, unless I actively decide to start the next chapter. (Admittedly, some MP3 players don’t have an option for this anyway and will always start the next track. This annoys me.) - Even with chapter metadata, I find it difficult to seek through a 10+ hour m4b file. Seeking through a 10 – 60 minute chapter is more manageable. (Of course, this doesn’t always work out; A Memory of Light has a single chapter that’s more than ten hours long. Whatever, I want to split in a way that follows the author’s structure, and Sanderson purposefully chose to write one extremely long chapter.) I probably sound like I regularly switch between 20+ different models of MP3 player. In fact, I mostly use my computer or iPhone these days; however, I expect my audiobook collection to outlast any one piece of hardware.
- eloisius 1y agoAnd maybe someone else uses “American” style dates in their file names mm-dd-YYYY, can those also be put in correct order for those users?
- Scarblac 1y ago> I will add that I'm plenty "smart" enough to understand that "10" comes before "9" in a strictly alphabetical sense Strictly speaking 9, 1 and 0 are not in the alphabet so can't be sorted alphabetically. And I think most "normal users" wouldn't expect that programmers generalize the alphabet like we do.
- tripzilch 1y ago> This works, but it looks kind of ugly Maybe I'm weird but I prefer the way zero padding looks :) I personally think the misalignment of lines where the numbers have different lengths looks (a lot) uglier than having zero padding. Sometimes it even throws _me_ off because the numbers have different lengths and ... well it just doesn't look sorted to me! :) So the bonus of zero padding is that it'll be sorted correctly even if the file manager tries to be "smart" and sort incorrectly.