Clearly your gender field is a boolean. Which means it can be either true, false, null, or undefined. Except in javascript where for some reason it can sometimes be NaN, but only when you try to compare two people.
this post was submitted on 14 Jan 2025
88 points (93.1% liked)
Programmer Humor
20106 readers
7 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
A boolean, so 8 bits of freedom to fill up
Even booleans take up 8 bits. And that's a lot of wasted space.
That's why you use bitarrays and bitflags instead when you need more than just one or two arguments for a function.
Solution: 1 bit computer
Gender is a pointer
Bold of programmers to assume gender can be expressed accurately in a finite discrete system. Gonna have to bust the Taylor series for some better approximation.
isMale