AI Bubblesort

a year ago by fubarx to c/programmer_humor

dfyx 103 points a year ago

I don’t see any AI, just a list that got sorted alphabetically when it shouldn’t have been.

path: 0 19671424, hotness: undefined, score: 103, children: 7
Successful_Try543 41 points a year ago

The list would be extra fun in a foreign language but keeping the English order.

path: 0 19671424 19671837, hotness: undefined, score: 41, children: 5
vaionko 28 points a year ago

Not exactly this, but I hate it when devices translate all the languages in the language selection screen to the chosen language. So I have to guess what "English" is in Chinese. As if it wasn't difficult enough to navigate to said menu

path: 0 19671424 19671837 19672062, hotness: undefined, score: 28, children: 3
9point6 16 points a year ago

You've reminded me of my favourite one of those that's probably mostly experienced by British people

On a country or language list I'm either looking for, "United Kingdom" "Great Britain", "Britain"/"British", "England"/” English"

Now that's kinda fair enough, it's usually UK, so I go to the bottom and start my hunt there.

The big problem comes when the list is ordered by whatever value they're using to represent the choice, not the text itself, so you get stuff like "United Kingdom" where "Great Britain" should be.

This is not uncommon

path: 0 19671424 19671837 19672062 19672279, hotness: undefined, score: 16, children: 2
Successful_Try543 21 points a year ago

As a German, you often don't find Deutschland in a list behind Danmark, but between other countries starting with G.

path: 0 19671424 19671837 19672062 19672279 19672367, hotness: undefined, score: 21, children: 0
yermaw 4 points a year ago

I often wonder how many man hours have been wasted searching for the country. Especially when it's not strictly necessary.

Its a minimum wage job in the UK im applying for. Lets assume its a safe bet and put UK at the top of the list.

path: 0 19671424 19671837 19672062 19672279 19672521, hotness: undefined, score: 4, children: 0
Valmond 4 points a year ago

And forgetting that there are countries whos first floor is the ground floor.

path: 0 19671424 19671837 19672513, hotness: undefined, score: 4, children: 0
boonhet 6 points a year ago

AI might actually do better if used to sort here since it MIGHT give you the proper order

path: 0 19671424 19673192, hotness: undefined, score: 6, children: 0
Quibblekrust 55 points a year ago

Umm... That's just alphabetical.

path: 0 19671592, hotness: undefined, score: 55, children: 2
potoo22 4 points a year ago

Tomāto potăto

path: 0 19671592 19672414, hotness: undefined, score: 4, children: 1
eager_eagle 1 point a year ago

aamoooopTttt*

path: 0 19671592 19672414 19686886, hotness: undefined, score: 1, children: 0
ripcord 47 points a year ago

What does this have to do with AI or with bubblesort?

This looks like just a list sorted alphabetically. Which unfortunately doesn't work for the use case. But has been a problem in computing for like literally 70 years.

path: 0 19676360, hotness: undefined, score: 47, children: 2
a4ng3l 11 points a year ago

But your explanation is sooooo much less trendy… we’re back to reddit karma bullshit :-(

path: 0 19676360 19677697, hotness: undefined, score: 11, children: 1
CanadaPlus 4 points a year ago

I don't think we ever left. Or that Reddit invented the circlejerk, for that matter.

path: 0 19676360 19677697 19682642, hotness: undefined, score: 4, children: 0
Ganbat 27 points a year ago

AI

This kinda shit is as old as computers.

path: 0 19674159, hotness: undefined, score: 27, children: 4
Muaddib -4 points a year ago

So is AI

path: 0 19674159 19678023, hotness: undefined, score: -4, children: 3
Ganbat 4 points a year ago

Errors such as this have been occurring by human hands for decades, while adversarial networks and language models capable of making the same error have only been available for a few years. As such, attributing all such errors to AI is foolish, as humans have already proven capable of making the same types of mistakes.

path: 0 19674159 19678023 19684453, hotness: undefined, score: 4, children: 0
chuckleslord 2 points a year ago

No, it isn't. The neutral network was invented in 1943. The first digital computer (what we would think of as a computer) was invented in 1938. The Turing Machine concept was created in 1936.

path: 0 19674159 19678023 19681663, hotness: undefined, score: 2, children: 1
CanadaPlus 4 points a year ago

Actually trainable neural networks were way later than that, even.

Then again, AI = neural network is very recent definition, like just a few years, which is probably what OP meant.

path: 0 19674159 19678023 19681663 19682691, hotness: undefined, score: 4, children: 0
vk6flab 12 points a year ago

.. and this is why we use YYYY-MM-DD as the date format.

path: 0 19682805, hotness: undefined, score: 12, children: 1
ICastFist 1 point a year ago

twenty twenty five, august, five

two thousand and twenty five, february first

path: 0 19682805 19685569, hotness: undefined, score: 1, children: 0
Deceptichum 11 points a year ago
path: 0 19672411, hotness: undefined, score: 11, children: 0
kickeriekuh 11 points a year ago

In German, numbers are spoken from left to right, as in English, but ones and tens are always swapped. So 23 becomes three, twenty, and 135 becomes one hundred, five, and thirty:

  • Achter Stock (8)
  • Achtzehnter Stock (18)
  • Achtundzwanzigster Stock (28)
  • Dreizehnter Stock (13)
  • Dreiundzwanzigster Stock (23)
  • Dritter Stock (3)
  • Einundzwanzigster Stock (21)
  • Elfter Stock (11)
  • Erdgeschoss (0)
  • Erster Stock (1)
  • ...

Oh, and the first floor is called the ground floor and is not counted.

path: 0 19673525, hotness: undefined, score: 11, children: 5
bandwidthcrisis 1 point a year ago

The UK also has the off-by-one floor numbering.

Also a nursery rhyme with the line "four and twenty blackbirds"!

path: 0 19673525 19677126, hotness: undefined, score: 1, children: 4
BuboScandiacus 1 point a year ago

path: 0 19673525 19677126 19681999, hotness: undefined, score: 1, children: 3
JcbAzPx 3 points a year ago

That is only one and ten blackbirds.

path: 0 19673525 19677126 19681999 19684638, hotness: undefined, score: 3, children: 2
bandwidthcrisis 3 points a year ago

There are probably some that you can't see.

path: 0 19673525 19677126 19681999 19684638 19686124, hotness: undefined, score: 3, children: 1
falseWhite 4 points a year ago
path: 0 19672783, hotness: undefined, score: 4, children: 0
probable_possum 3 points a year ago

Should have been digits

path: 0 19672787, hotness: undefined, score: 3, children: 3
JohnnyCanuck 10 points a year ago

1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30...

path: 0 19672787 19673885, hotness: undefined, score: 10, children: 2
probable_possum 2 points a year ago

Huh. 101.

Maybe the comparable.is_greater_than(int) function needs some work. Or someone compared strings. :)

path: 0 19672787 19673885 19675541, hotness: undefined, score: 2, children: 1
JohnnyCanuck 2 points a year ago

Or someone compared strings.

Yes, that's my joke. Using digits in a string list isn't enough, you have to be smart with your sorting and sort the numbers before you make the string list for your drop down.

path: 0 19672787 19673885 19675541 19680966, hotness: undefined, score: 2, children: 0
balsoft 2 points a year ago
❯ touch `seq 1 100`
❯ ls
1    18  27  36  45  54  63  72  81  90
10   19  28  37  46  55  64  73  82  91
100  2	 29  38  47  56  65  74  83  92
11   20  3   39  48  57  66  75  84  93
12   21  30  4	 49  58  67  76  85  94
13   22  31  40  5   59  68  77  86  95
14   23  32  41  50  6	 69  78  87  96
15   24  33  42  51  60  7   79  88  97
16   25  34  43  52  61  70  8	 89  98
17   26  35  44  53  62  71  80  9   99

(Do I need to tell you how many times I fucked up like this myself?)

path: 0 19671687, hotness: undefined, score: 2, children: 3
boonhet 5 points a year ago

Those are file names, there’s no reason to assume that they would be numerical which is why ls does the right thing.

I’m of the opinion that if you want to store numbers as strings and also sort them, you give them a fixed length and leading zeroes.

path: 0 19671687 19673214, hotness: undefined, score: 5, children: 1
balsoft 2 points a year ago

I agree that it does "the right thing", that is it behaves as documented. But that "right thing" could be surprising to a human.

There's ls -v which does "version sort" which would seem like a more reasonable default, at least for human consumption. I know it's impossible to change now because a bajillion tools all over the place depend on the sort order.

However new tools like eza do this by default:

❯ eza
1  6   11  16  21  26  31  36  41  46  51  56  61  66  71  76  81  86  91  96
2  7   12  17  22  27  32  37  42  47  52  57  62  67  72  77  82  87  92  97
3  8   13  18  23  28  33  38  43  48  53  58  63  68  73  78  83  88  93  98
4  9   14  19  24  29  34  39  44  49  54  59  64  69  74  79  84  89  94  99
5  10  15  20  25  30  35  40  45  50  55  60  65  70  75  80  85  90  95  100
path: 0 19671687 19673214 19673277, hotness: undefined, score: 2, children: 0
luciferofastora 1 point a year ago
❯ ls -l | sort -n

Shouldn't that work correctly?

path: 0 19671687 19675474, hotness: undefined, score: 1, children: 0
pitaya 1 point a year ago

Bubble sort where?

path: 0 19703435, hotness: undefined, score: 1, children: 0
latenightnoir 1 point a year ago

"...y'know what? Let's just say I'm homeless!"

path: 0 19673151, hotness: undefined, score: 1, children: 0
falseWhite 1 point a year ago
path: 0 19672765, hotness: undefined, score: 1, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
33631
2561
7551

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.

go to feed...