this post was submitted on 21 Mar 2025
641 points (99.5% liked)

Programmer Humor

21809 readers
1775 users here now

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

founded 2 years ago
MODERATORS
 

Original post: hachyderm.io (Mastodon)

you are viewing a single comment's thread
view the rest of the comments
[–] LovableSidekick@lemmy.world 8 points 1 day ago* (last edited 1 day ago) (1 children)
[–] Flipper@feddit.org 4 points 1 day ago (1 children)

Fun and games till x overflows.

[–] LovableSidekick@lemmy.world 1 points 1 day ago (1 children)

LOL but it was ' x + 1' not 'x += 1' tho.

[–] Flipper@feddit.org 4 points 1 day ago

We don't know what value X has. If it isn't initialised it could have any value including the maximum. Then it would overflow.

But let's be honest, that is unlikely.