this post was submitted on 24 Apr 2025
196 points (97.1% liked)
Comic Strips
16181 readers
2060 users here now
Comic Strips is a community for those who love comic stories.
The rules are simple:
- The post can be a single image, an image gallery, or a link to a specific comic hosted on another site (the author's website, for instance).
- The comic must be a complete story.
- If it is an external link, it must be to a specific story, not to the root of the site.
- You may post comics from others or your own.
- If you are posting a comic of your own, a maximum of one per week is allowed (I know, your comics are great, but this rule helps avoid spam).
- The comic can be in any language, but if it's not in English, OP must include an English translation in the post's 'body' field (note: you don't need to select a specific language when posting a comic).
- Politeness.
- Adult content is not allowed. This community aims to be fun for people of all ages.
Web of links
- !linuxmemes@lemmy.world: "I use Arch btw"
- !memes@lemmy.world: memes (you don't say!)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
So that’s the joke then? That someone chose to alphabetically sort numbers?
The joke is that computers work this way, and it's aggravating.
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
I’m assuming that normalizing digits is similar to normalizing audio? Where you take the numbers and assigning them all a blanket set of instructions?
Normalization in mixing audio essentially takes a track and adjusts the volume of the track’s peaks to keep them from clipping the volume threshold.
Is it like this?
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.
Ahhh. So you have automated processes that will handle it as well. Just plug in the ranges and it does its thing.
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.
Seems like programming isn’t too dissimilar to giving a child instructions.
It definitely feels like that!
Have a classic joke on the subject:
I really wish I knew what the joke was. 🥺
Most software errors are edge cases, like when a program receives an input from a user that the programmer didn't account for.
The software tester is "fuzzing" the input function of the bar by throwing a bunch of weird inputs at it, like jumping through the door rather than walking or ordering absurd, negative, or non-numerical quantities of beer. This is a common way of testing software to make sure it won't crash and burn if unexpected things happen.
Satisfied that the inputs for entering the bar and ordering beer are working properly, the bar opens, and the very first customer still manages to crash it by asking something entirely unrelated to ordering beer.
Ahhh! I get it. Okay, yeah. That’s funny. 😄
Wow. Reply guy party.
Being computer illiterate makes you angry, I guess?
Me? Not at all. Unless you meant the comic strip thing, then yeah. I suppose I could see that.
Being bad at a lot of things doesn’t bother me a bit. I’m good at other things. And some of those things, I’m even great at!
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).