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) and come up with something reasonably consistent for the rest.
> There's a user expectation that photo20.jpg comes after photo3.jpg
I expect photo20.jpg to come first.
> There's no user expectation around whether photo1.jpg or photo01.jpg comes first.
Clearly photo01.jpg comes first.
> Just like there's no user expectation around whether photo1.jpg or Photo1.jpg comes first.
Of course Photo1.jpg comes first because uppercase comes before lowercase.
It really sounds like you're using the word "user" to mean "dumb" and I wonder, what got you to the point that you started considering yourself an expert on "dumb" and feeling the need to defend "dumb" ?
I'm sorry but it all comes off so condescending, like "users" are a different+lower species or something.
> An algorithm must be unambiguosly specified for all possible inputs.
And it is. It's just that some outputs may not match what the user expects. TFA's preferred algorithm (simple lexicographic sorting) matches user expectations 90% of the time. The algorithm actually in use on most OSs (simple lexicographic sorting + treat consecutive digits as combined numbers) matches expectations 99% of the time. An algorithm that matches expectations 100% of the time doesn't exist. Shouldn't we pick the 99% algorithm?
(I am admittedly making up the actual percentages, but you get the point.)
I get your point but I still disagree (also about the percentages btw). Can you also get _my_ point?
Well-designed machines quite _often_ operate against "user" expectations when those expectations are wrong.
For instance say if I charge my phone for an hour, it'll last for a day. How long will it last when I charge it for two hours? Because in practice the answer is either "also a day" or it is "the battery catches on fire", this machine acts _against_ user expectations and stops charging the phone after an hour.
Maybe an even better example: coins! I dunno about coins in the US but but get this: the 5 eurocent coin is _bigger_ than the 10 eurocent coin! I dunno why, or if there even is a good reason for that, but it doesn't seem to bother "users" of money (e.g. everybody) when they have to sort out cash.
Anyway my point is that even if _some_ (but definitely not all!) people may expect numerical sorting, doesn't mean that they're right ... and it's not like lexicographic sorting is rocket science and zero padding .. well I think you said you don't like the way it looks, but I actually think it looks very neat because things line up and it's actually easier to read for me, as well :)
It's dumbing things down, in a bad way. It's like hiding the inner workings of stuff, and it's a mistake to think that even if somebody is not familiar with computers that they are _stupid_. People might even get curious and figure out that numbers come before uppercase and those come before lowercase. And maybe one day someone comes along and says "you know that's because of ASCII?" and they learn a thing! Which is cool.
Instead it's like you're painting people scratching their heads wondering "why number not go up?"
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) and come up with something reasonably consistent for the rest.