Not just someone. It’s the default when numbers are in text strings, they are treated as text, not as numerical values.
To account for numbers in text strings in any text listing system, requires quite a bit of extra work when programming it.
So the joke is that computers are pretty dumb in this regard, and they need a lot of help to do it right.
Basic sorting is always like this, the joke is that way too many people still number things badly. Alphanumerically sorting variable-length numbers without normalizing the number of digits will always result in situations like 02 < 1 < 109 < 11 < 2
Indeed! That kind of scale-sensitive value-based sort requires the data to be invariant in other ways, though. For example, “Episode Three” has 13 charachters, so it would come after “Episode Four” which only has 12 and therefore must be smaller.
Turns out that sorting things is way more complicated than it seems. The wikipedia page on sorting algorithms in computer science lists 37 different ways to sort numbers and it is far from an exhaustive list.
I found it especially overblown since I ran into a very similar issue recently. I actually laughed at myself when I saw the mangled list and fixed the names (it helped that the list was something I generated with a script and adding leading zeroes was a simple matter).
Oh no this isn’t it, this is extremely basic. As a programmer you will encounter way way more complex logic problems, so logic problems become 2nd nature. And it can be frustrating when “normies” don’t understand what appear to a programmer to be a matter of pretty simple logic thinking.
Because it’s the same? Or because it’s very different?
My wife was a professional musician for a few years.
PS:
Do you get this joke?
The wife sends the man for shopping and asks him to buy 1 liter milk and if they have eggs buy 12.
When he comes home, she looks at him astonished, why did you buy 12 liters of milk?
Because they had eggs he responds.
It’s sorted alphabetically. All the numbers that start with “1” come first, then all the numbers that start with “2”, regardless of how long the actual number is.
deleted by creator
In alphabetical sorting 11 comes before 2 For the same reason AA is before B.
deleted by creator
Not just someone. It’s the default when numbers are in text strings, they are treated as text, not as numerical values.
To account for numbers in text strings in any text listing system, requires quite a bit of extra work when programming it.
So the joke is that computers are pretty dumb in this regard, and they need a lot of help to do it right.
Basic sorting is always like this, the joke is that way too many people still number things badly. Alphanumerically sorting variable-length numbers without normalizing the number of digits will always result in situations like 02 < 1 < 109 < 11 < 2
deleted by creator
Yeah! In general, Normalization refers to adjusting values measured on different scales to a common scale.
Consider 1 and 10. The value of the first digit of both numbers is 1, so a scale-invariant numerical sort sees both numbers as coming before 2.
Normalizing both numbers to a two digit scale gives us 01 and 10, which sort as expected with 02.
deleted by creator
Indeed! That kind of scale-sensitive value-based sort requires the data to be invariant in other ways, though. For example, “Episode Three” has 13 charachters, so it would come after “Episode Four” which only has 12 and therefore must be smaller.
Turns out that sorting things is way more complicated than it seems. The wikipedia page on sorting algorithms in computer science lists 37 different ways to sort numbers and it is far from an exhaustive list.
deleted by creator
Wow. Reply guy party.
deleted by creator
The joke is that computers work this way, and it’s aggravating.
Being computer illiterate makes you angry, I guess?
deleted by creator
No, I did not mean you.
I found it especially overblown since I ran into a very similar issue recently. I actually laughed at myself when I saw the mangled list and fixed the names (it helped that the list was something I generated with a script and adding leading zeroes was a simple matter).
Filenames are text, not numbers, so 11 comes before 2. So does 111, 101, etc. Anything starting with 1 is before 2.
In order to sort “properly”, you have to name your files properly.
00
01
02
up to…
99
If you have more than 100 files in the same folder, the you have to go back through and re-name them:
000
001
002
… 099
100
deleted by creator
Oh no this isn’t it, this is extremely basic. As a programmer you will encounter way way more complex logic problems, so logic problems become 2nd nature. And it can be frustrating when “normies” don’t understand what appear to a programmer to be a matter of pretty simple logic thinking.
deleted by creator
It’s so nice we have people like you, that allows us to feel superior, even if we are inferior in every other way imaginable. 👍
deleted by creator
Because it’s the same? Or because it’s very different?
My wife was a professional musician for a few years.
PS:
Do you get this joke?
The wife sends the man for shopping and asks him to buy 1 liter milk and if they have eggs buy 12.
When he comes home, she looks at him astonished, why did you buy 12 liters of milk?
Because they had eggs he responds.
deleted by creator
It’s also why stuff like this exists:
https://www.bulkrenameutility.co.uk/
deleted by creator
A Perl program to convert the number of digits in the first numeric field that appears in a list of filenames.
source
Looks something like:
It’s sorted alphabetically. All the numbers that start with “1” come first, then all the numbers that start with “2”, regardless of how long the actual number is.
it doesn’t, it reconciles that 02 comes before 11
deleted by creator
yeah