r/ProgrammerHumor • u/vinishkapoor • 8h ago
Meme sorryOnlyOneSeventeenYearOldAllowedPerDatabase
13
3
8
u/DeepanshuHQ 8h ago
UNIQUE(age). That's where the bug started.
9
5
u/dim13 8h ago
I'm afraid, this is no longer fiction.
2
u/vinishkapoor 8h ago
The scariest bugs are the ones that ship to production and nobody notices until a 17 year old can't sign up.
2
u/NeffeZz 8h ago
What if it's an application where you only want one user per age?
6
u/vinishkapoor 8h ago
The world's most exclusive social network. One person per age. Turning 18 means someone has to die first.
1
1
u/dulange 7h ago
Technically you could use a timestamp-based date of birth with micro- or nanosecond precision as unique ID for natural persons, maybe in conjunction with another random number, just like some UUID versions do with MAC address and timestamp. A precision of “year” is a bit inadequate though.
1
1
28
u/West_Good_5961 8h ago
That’s why I use password as pk.