this post was submitted on 13 Dec 2025
370 points (97.9% liked)

Programmer Humor

27836 readers
1093 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
you are viewing a single comment's thread
view the rest of the comments
[–] edinbruh@feddit.it 31 points 12 hours ago (1 children)

For a time on Reddit (some years ago when I still used it) there was a trend of finding the worst way of implementing is_even(x: int) -> bool. My contribution to that was a function that ran Ackerman(x,x) flipping a Boolean at every iteration, and check if it was true or false at the end.

It works btw, I will find the proof later

[–] uranibaba@lemmy.world 7 points 10 hours ago (1 children)

I would love to see the implementaion.

[–] edinbruh@feddit.it 8 points 6 hours ago* (last edited 6 hours ago)

The implementation is not very exciting, I capture a variable in python. It could have been done more cleanly.

collapsed inline media1000041934

The proof is this. But, I could have made mistakes, it was many years ago.

collapsed inline media1000041935

Note that in python you'll never be able to run is_even(5) the stack cannot handle it

Edit: daaaamn, that variable is ugly as hell. I would never do things like that now.