this post was submitted on 20 Dec 2023
661 points (96.4% liked)

Programmer Humor

31808 readers
381 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
all 31 comments
sorted by: hot top controversial new old
[–] [email protected] 45 points 8 months ago* (last edited 8 months ago) (3 children)

the sheer longevity of some xkcd comic in-jokes is really impressive.

edit: this one is over 15 years old (xkcd 327 - 'Exploits of a Mom' - 10/10/2007)

[–] [email protected] 23 points 8 months ago

All I'm going to say is I still remember "correcthorsebatterrystaple"....

[–] [email protected] 15 points 8 months ago

my spin of it

[–] [email protected] 8 points 8 months ago

15 years already?

[–] [email protected] 32 points 8 months ago (4 children)

This actually gave me an idea. Over break I wanted to practice dB design and entity framework. Designing a database and interface for santa to track kids naughty or nice could be a fun/interesting way of doing it.

[–] [email protected] 13 points 8 months ago

Good way to get yourself on an FBI tracker too.

[–] [email protected] 8 points 8 months ago

Just FYI, LinqPad is a really neat tool for messing around with EFCore. I use it all the time for testing ideas or doing quick tasks that I don't want to spin up a new project for.

[–] [email protected] 6 points 8 months ago (1 children)

But is naught/nice a binary value?

[–] [email protected] 9 points 8 months ago (1 children)

I think you would have a table of "activities" with a value of how good/bad each is. So like cleaning your room would be +5 but crying in a store because mommy wouldn't buy you a toy would be - 15. Then you have a table for children and each child starts with 0 in January and then for each activity the child does there naughty/nice value gers adjusted. December 24 Santa runs a query on the dB and gets a list of every child with a positive value.

Keep in mind I currently feel sick and put about 5 minutes of thought into thus.

[–] [email protected] 10 points 8 months ago (2 children)

Actually I think there should be a intermediary table as a history of activities of each child. Like child table is I'd, name, age, address, and naughty/nice value, activities would be Id, description, and good/bad value. Then a history table of ID, child_id, activity_id. So santa can recalculate a child's naughty/nice value to "check it twice"

[–] [email protected] 9 points 8 months ago

Redundancy is key. There should always be two methods for calculating a child's ANNS (Aggregate Naughty Nice Score). I propose a conventional method where activities are graded from -5 to +5 where a child's ANNS is the sum of all their previous activities, this would be a child's historical ANNS. And I propose a second system where only the activities performed within the last 365 days of calculation are considered, to account for children who have drastically changed behavior year to year, this would be a child's current year ANNS. I think the current year ANNS would hold more weight in Santa's judgement but looking at the historical ANNS in conjunction with the current year could help provide a better picture of a child's character.

[–] [email protected] 7 points 8 months ago (1 children)

This is starting to sound like The Good Place with extra steps...

[–] [email protected] 9 points 8 months ago (1 children)

North Pole Incorporated

bringing all the fun of HR and spreadsheet drudgery to the little boys and girls of the world

[–] [email protected] 2 points 8 months ago

I mean in a certain light, christmas presents are a yearly bonus for children and Santa checking his list is a management review of the child's performance...

[–] [email protected] 2 points 8 months ago (1 children)

Ooh this is actually a good learning example.

Kids will have their wish list that's another table that we wanna reference. Then of course do we have the name of the toys in the table, or simple reference "Toys" table.

Also need an address table as some kids get Santa gifts at more than one house...

[–] [email protected] 2 points 8 months ago (1 children)

I didn't even consider incorporating toy distribution... At what levels should kids get a small gift(a toy or game) vs a large gift(bike, game system etc).

In a real world scenario I would probably spilt this between 2 databases.. One for kids ("with a nice score of 2 you get a toy of value 4 or less") and one for toys ("the toys available with a value less than 4 are...")

[–] [email protected] 2 points 8 months ago (1 children)

Gonna need a whole auto converter thing to make sure that requests for "ps" "play station" and "new play station" all get converted to same thing!

[–] [email protected] 2 points 8 months ago

Yeah... Which is 100x more complicated cause Microsoft has no idea how to name consoles

[–] [email protected] 16 points 8 months ago

Santa’s clause will bring the DB down

[–] [email protected] 15 points 8 months ago (1 children)

Hope that the behavior is enum and indexed. ...and that the table doesn't have to many columns ...and there aren't many nice people ...god damn it just select only what you need and use limit

[–] [email protected] 3 points 8 months ago

select only what you need and use limit

you don't know the structure of the contacts table, and do you really want christmas gifts to only go to the first x number of nice people?

update contacts set name = 'Grinch' where name = 'FellowHuman';

[–] [email protected] 13 points 8 months ago* (last edited 8 months ago) (1 children)

You finally prompted me to create an account for Lemmy just so I could give you an upvote for making me smile.

[–] [email protected] 1 points 8 months ago

Welcome. I hope you'll have a great time here

[–] [email protected] 7 points 8 months ago

A true holiday classic

[–] [email protected] 7 points 8 months ago (1 children)

He maintains when you are sleeping, he backs up while you're awake. BEGIN TRANS so if your code is no good you can ROLLBACK your mistakes.

[–] [email protected] 2 points 8 months ago
[–] [email protected] 6 points 8 months ago* (last edited 8 months ago)

This is mandatory to be posted every year for Christmas. Always makes me smile and sing along

[–] [email protected] 2 points 8 months ago

"Behaved" would fit scansion better.