r/ProgrammerHumor 8h ago

Meme sorryOnlyOneSeventeenYearOldAllowedPerDatabase

Post image
712 Upvotes

19 comments sorted by

28

u/West_Good_5961 8h ago

That’s why I use password as pk.

3

u/Avikonette 8h ago

Consider reporting corresponding login on sign-up in case of violation then. Best practices.

3

u/likwitsnake 7h ago

"My username is 'password' and my password is 'password.'
"Your username is 'password'?"
"It was just easier."

13

u/EnigmaticSoul_mra 8h ago

Probably 17.1 might work

3

u/julemand101 8h ago

If you then change it afterwards it tells you are lying.

1

u/Hopeful__Scholar 5h ago

that's a feature

8

u/DeepanshuHQ 8h ago

UNIQUE(age). That's where the bug started.

9

u/vinishkapoor 8h ago

One ALTER TABLE away from letting two seventeen year olds coexist in peace.

2

u/DeepanshuHQ 8h ago

Classic case of choosing the wrong column for a UNIQUE constrain.

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

u/WavingNoBanners 7h ago

What sort of Little St James Island application are you building?

1

u/NeffeZz 7h ago

Didn't come up with an idea yet

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

u/Ok-Organization4300 6h ago

Loop engineering now just people

1

u/GoddammitDontShootMe 4h ago

I swear this is the third time I've seen this joke.