this post was submitted on 16 Dec 2025
1318 points (99.3% liked)

Programmer Humor

28023 readers
1591 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
[–] joyjoy@lemmy.zip 97 points 1 week ago* (last edited 1 week ago) (18 children)

I would make two separate views. 

CREATE VIEW NiceList AS
 SELECT * FROM Children
  WHERE behavior = 'nice' 
   AND parent.income > 40000; 
CREATE VIEW NaughtyList AS
 SELECT * FROM Children
  WHERE behavior = 'naughty'; 
[–] KairuByte@lemmy.dbzer0.com 8 points 1 week ago (6 children)

Why are we using magic strings for behavior?

[–] joyjoy@lemmy.zip 28 points 1 week ago (1 children)

Feel free to fork my comment. 

[–] Tja@programming.dev 11 points 1 week ago

Does Santa accept PRs?

load more comments (4 replies)
load more comments (15 replies)