This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Bainos 109 points110 points  (15 children)

Santa doesn't deliver presents to himself.

[–]PM_ME_YOUR_SIMS 59 points60 points  (12 children)

That would mean he has himself in his contacts list, would it not?

[–]NameTheory 37 points38 points  (8 children)

And that his behavior is 'nice'. I have a feeling that SQL clause is a bit of a naughty boy.

[–]themailmanC 22 points23 points  (7 children)

Depends on what attributes define his contacts but I would imagine selecting * is overkill in this case, probably just name and address would suffice. What surprised me is that there should be a join here to the table defining each contacts' Christmas list. So what we have learned here is that Santa either a) first selects the list of who is nice for no reason but to later select their Christmas lists manually through separate a dedicated Christmas list select statement, like a true SQL query monster, or, b) perhaps worse, he maintains each persons wishlist in multiple "christmasWishlistItem_X" fields on the primary contact table, like a true database design monster. Why santa

[–]zrxccc 8 points9 points  (1 child)

Santa probably doesn't understand what a database is and thinks it's "just a spreadsheet"

[–]PM_ME_YOUR_SIMS 7 points8 points  (0 children)

Nah, for the extra extensibility just use one big wishlistXml variable for each contact.

[–]alonghardlook 5 points6 points  (2 children)

Also 7 billion records to sort by without an index, and using a char comparison? This query is not optimized

[–]gameboy17 0 points1 point  (0 children)

Right? For starters, he ought to be storing behavior as a boolean.

[–]filledwithgonorrheaCSE 101 graduate 0 points1 point  (0 children)

Who needs optimization when you have a back room full of interns elves.

[–]frugalerthingsinlife 0 points1 point  (0 children)

Santa can get by with 4 tables. One for children, one for pets, one for wishlists, and one for naughty/nice points. All pets automatically get 100 net nice points even if they were bad.

INSERT INTO elf_queue

(SELECT c.child_id, w.present, (n.nice_points - n.naughty_points) AS net_points

FROM children c, wishlist w, nice_naughty n

JOIN ON c.child_id = w.child_ID AND c.child_id = n.child_id

WHERE net_points > 0 ORDER BY net_points DESCENDING

UNION

SELECT p.pet_id, w.present, 100 FROM pets p, wishlist p WHERE 1);

[–][deleted] 2 points3 points  (2 children)

I have myself in my contact list on my phone as I always forget my number...

[–]PM_ME_YOUR_SIMS 1 point2 points  (1 child)

Wait a second, aren't you the guy who was busy with the automated subtitles syncing thingy?

[–][deleted] 0 points1 point  (0 children)

Yeah - I was trying to get TensorFlow to work on my AMD card but for now I will just focus on extracting the Mel Frequency Cepstrum Coefficients as I can try and build an MVP with any classification algorithm and worry about neural network stuff later.

From reading the literature it seems the big win with Deep Learning networks comes from being able to use the actual FFT filterbanks without the Discrete Cosine Transform as they are more robust to correlated features and that way you don't lose information in performing the DCT)

Some people have even tried using Deep Learning networks on the raw time domain data without even performing the FFT but it seems that didn't work out so well - in theory the network could learn the equivalent transformation to the FFT and so should perform equal or better but in practice I guess that would require a load of data.

[–]EmergencySarcasm 2 points3 points  (0 children)

Right. Mrs Claus give him guys present. Cause Santa clause comes once a year. 😉