this post was submitted on 24 Apr 2025
205 points (97.2% liked)

Comic Strips

16448 readers
2120 users here now

Comic Strips is a community for those who love comic stories.

The rules are simple:

Web of links

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] WrenFeathers@lemmy.world 4 points 2 weeks ago (1 children)

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?

[–] knightly@pawb.social 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

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.

[–] WrenFeathers@lemmy.world 2 points 2 weeks ago (1 children)

Ahhh. So you have automated processes that will handle it as well. Just plug in the ranges and it does its thing.

[–] knightly@pawb.social 1 points 2 weeks ago (1 children)

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.

[–] WrenFeathers@lemmy.world 3 points 2 weeks ago (1 children)

Seems like programming isn’t too dissimilar to giving a child instructions.

[–] knightly@pawb.social 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

It definitely feels like that!

Have a classic joke on the subject:

A software tester walks into a bar.

Runs into a bar.

Crawls into a bar.

Dances into a bar.

Flies into a bar.

Jumps into a bar.

And orders a beer.

2 beers.

0 beers.

99999999 beers.

a lizard in a beer glass.

-1 beer.

"qwertyuiop" beers.

Testing complete.

A real customer walks into the bar and asks where the bathroom is.

The bar goes up in flames.

[–] WrenFeathers@lemmy.world 2 points 2 weeks ago (1 children)

I really wish I knew what the joke was. 🥺

[–] knightly@pawb.social 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

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.

[–] WrenFeathers@lemmy.world 3 points 2 weeks ago

Ahhh! I get it. Okay, yeah. That’s funny. 😄