this post was submitted on 15 Jul 2025
444 points (94.6% liked)

Programmer Humor

37483 readers
222 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

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

You could use a loop to subtract 2 from the number until it equals one or zero

[–] TimeSquirrel@kbin.melroy.org 7 points 2 weeks ago (3 children)

Or literally just look at its binary representation. If the least significant digit is a "1", it's odd, if "0", it's even. Or you can divide by 2 and check for a remainder.

Your method is just spending time grinding away CPU cycles for no reason.

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

Sorry we're not all fucking math nerds like you who knows words like "significant" or "binary" or "divide", Poindexter. Some of us make do with whatever solution is available!

[–] racketlauncher831@lemmy.ml 1 points 2 weeks ago (1 children)

We know you were being satire. IMO it is of decent manner if you add "/s" to be explicit so when responding a serious reply, because this is not a satire comment chain.

[–] webadict@lemmy.world 6 points 2 weeks ago

Sorry we're not all fucking satire nerds like you who knows words like "serious" or "satire" or "/s", Poindexter. Some of us make do with whatever solution is available!

[–] thann@lemmy.dbzer0.com 4 points 2 weeks ago

What should all the non binary people do then you bigot

[–] theherk@lemmy.world 4 points 2 weeks ago

Wasn’t the fun the CPU cycles we wasted along the way?