▲ 1341 ▼ Little Timmy Tables (programming.dev) submitted 10 months ago by andioop@programming.dev to c/programmer_humor@programming.dev 57 comments fedilink hide all child comments
[–] NullPointerException@lemmy.ca 112 points 10 months ago (23 children) Why would Santa need two separate tables for this? permalink fedilink source hideshow 23 child comments replies: [–] spiffpitt@lemmy.world 149 points 10 months ago (1 child) don't underestimate database design in production environments permalink fedilink source parent hideshow 1 child comment replies: [–] phorq@lemmy.ml 43 points 10 months ago Exactly, Santa's always watching and audit logs get complicated permalink fedilink source parent [–] joyjoy@lemmy.zip 105 points 10 months 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'; permalink fedilink source parent hideshow 18 child comments replies: [–] NullPointerException@lemmy.ca 68 points 10 months ago The income is a nice touch. permalink fedilink source parent [–] criss_cross@lemmy.world 28 points 10 months ago (4 children) The poor kids can’t even afford coal and fall through the cracks. permalink fedilink source parent hideshow 4 child comments replies: [–] laurelraven@lemmy.zip 11 points 10 months ago (3 children) Only the nice ones, the naughty poor children get free coal permalink fedilink source parent hideshow 3 child comments replies: [–] naeap@sopuli.xyz 4 points 10 months ago* (2 children) But not the poor nice ones permalink fedilink source parent hideshow 2 child comments replies: [–] RustyShackleford@programming.dev 5 points 10 months ago (1 child) The poor nice ones get beaten by the naughty rich ones. permalink fedilink source parent hideshow 1 child comment replies: [–] ulterno@programming.dev 0 points 10 months ago ... and by the "nice" rich ones. permalink fedilink source parent [–] ryannathans@aussie.zone 7 points 10 months ago (1 child) You forgot the join smh permalink fedilink source parent hideshow 1 child comment replies: [–] joyjoy@lemmy.zip 5 points 10 months ago Omitted for brevity. permalink fedilink source parent [–] KairuByte@lemmy.dbzer0.com 6 points 10 months ago (6 children) Why are we using magic strings for behavior? permalink fedilink source parent hideshow 6 child comments replies: [–] joyjoy@lemmy.zip 28 points 10 months ago (2 children) Feel free to fork my comment. permalink fedilink source parent hideshow 2 child comments replies: [–] Tja@programming.dev 12 points 10 months ago Does Santa accept PRs? permalink fedilink source parent [–] uranibaba@lemmy.world 2 points 10 months ago CREATE VIEW NiceList AS SELECT * FROM Children WHERE behavior > 2000 AND parent.income > 40000; CREATE VIEW NaughtyList AS SELECT * FROM Children WHERE behavior <= 2000; permalink fedilink source parent [–] TheOctonaut@mander.xyz 16 points 10 months ago (1 child) It's an ENUM and other people have to read this fucking codebase too, Brian! permalink fedilink source parent hideshow 1 child comment replies: [–] Olap@lemmy.world 5 points 10 months ago I've a DBA who would insist on this being in a dimension table and using a foreign key constraint instead of just a fucking string permalink fedilink source parent [–] djmikeale@feddit.dk 8 points 10 months ago He used to have an is_nice bool but consultants convinced Santa it isn't future proof enough to capture the nuances of kids behaviour in today's world, such as "nice but always is really smug about it". But the consultants kept making PowerPoints instead of updating the backend, so now Santa also has added a new value to behaviour: "consultant-like" permalink fedilink source parent [–] menas@lemmy.wtf 3 points 10 months ago (1 child) which default currency shall santa use ? Dollar have no sense, if presents are free. However Yuan may ease things with providers. permalink fedilink source parent hideshow 1 child comment replies: [–] joyjoy@lemmy.zip 8 points 10 months ago He's in the north pole, so probably Canadian dollars, Russian rubles, or Danish krone (Greenland) permalink fedilink source parent [–] Willy@sh.itjust.works 5 points 10 months ago stop static “variables”! use COL. congress should do the same for setting minimum wage. eg parent.income > COL permalink fedilink source parent [–] ilinamorato@lemmy.world 10 points 10 months ago* (last edited 10 months ago) Relational database. He's got children, which joins to naughty and nice on childid and both record their status each year so that he can monitor trends. permalink fedilink source parent [–] chocrates@piefed.world 6 points 10 months ago Once you get a few thousand columns wide you create a naughty_list2 for the new data permalink fedilink source parent
[–] spiffpitt@lemmy.world 149 points 10 months ago (1 child) don't underestimate database design in production environments permalink fedilink source parent hideshow 1 child comment replies: [–] phorq@lemmy.ml 43 points 10 months ago Exactly, Santa's always watching and audit logs get complicated permalink fedilink source parent
[–] phorq@lemmy.ml 43 points 10 months ago Exactly, Santa's always watching and audit logs get complicated permalink fedilink source parent
[–] joyjoy@lemmy.zip 105 points 10 months 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'; permalink fedilink source parent hideshow 18 child comments replies: [–] NullPointerException@lemmy.ca 68 points 10 months ago The income is a nice touch. permalink fedilink source parent [–] criss_cross@lemmy.world 28 points 10 months ago (4 children) The poor kids can’t even afford coal and fall through the cracks. permalink fedilink source parent hideshow 4 child comments replies: [–] laurelraven@lemmy.zip 11 points 10 months ago (3 children) Only the nice ones, the naughty poor children get free coal permalink fedilink source parent hideshow 3 child comments replies: [–] naeap@sopuli.xyz 4 points 10 months ago* (2 children) But not the poor nice ones permalink fedilink source parent hideshow 2 child comments replies: [–] RustyShackleford@programming.dev 5 points 10 months ago (1 child) The poor nice ones get beaten by the naughty rich ones. permalink fedilink source parent hideshow 1 child comment replies: [–] ulterno@programming.dev 0 points 10 months ago ... and by the "nice" rich ones. permalink fedilink source parent [–] ryannathans@aussie.zone 7 points 10 months ago (1 child) You forgot the join smh permalink fedilink source parent hideshow 1 child comment replies: [–] joyjoy@lemmy.zip 5 points 10 months ago Omitted for brevity. permalink fedilink source parent [–] KairuByte@lemmy.dbzer0.com 6 points 10 months ago (6 children) Why are we using magic strings for behavior? permalink fedilink source parent hideshow 6 child comments replies: [–] joyjoy@lemmy.zip 28 points 10 months ago (2 children) Feel free to fork my comment. permalink fedilink source parent hideshow 2 child comments replies: [–] Tja@programming.dev 12 points 10 months ago Does Santa accept PRs? permalink fedilink source parent [–] uranibaba@lemmy.world 2 points 10 months ago CREATE VIEW NiceList AS SELECT * FROM Children WHERE behavior > 2000 AND parent.income > 40000; CREATE VIEW NaughtyList AS SELECT * FROM Children WHERE behavior <= 2000; permalink fedilink source parent [–] TheOctonaut@mander.xyz 16 points 10 months ago (1 child) It's an ENUM and other people have to read this fucking codebase too, Brian! permalink fedilink source parent hideshow 1 child comment replies: [–] Olap@lemmy.world 5 points 10 months ago I've a DBA who would insist on this being in a dimension table and using a foreign key constraint instead of just a fucking string permalink fedilink source parent [–] djmikeale@feddit.dk 8 points 10 months ago He used to have an is_nice bool but consultants convinced Santa it isn't future proof enough to capture the nuances of kids behaviour in today's world, such as "nice but always is really smug about it". But the consultants kept making PowerPoints instead of updating the backend, so now Santa also has added a new value to behaviour: "consultant-like" permalink fedilink source parent [–] menas@lemmy.wtf 3 points 10 months ago (1 child) which default currency shall santa use ? Dollar have no sense, if presents are free. However Yuan may ease things with providers. permalink fedilink source parent hideshow 1 child comment replies: [–] joyjoy@lemmy.zip 8 points 10 months ago He's in the north pole, so probably Canadian dollars, Russian rubles, or Danish krone (Greenland) permalink fedilink source parent [–] Willy@sh.itjust.works 5 points 10 months ago stop static “variables”! use COL. congress should do the same for setting minimum wage. eg parent.income > COL permalink fedilink source parent
[–] NullPointerException@lemmy.ca 68 points 10 months ago The income is a nice touch. permalink fedilink source parent
[–] criss_cross@lemmy.world 28 points 10 months ago (4 children) The poor kids can’t even afford coal and fall through the cracks. permalink fedilink source parent hideshow 4 child comments replies: [–] laurelraven@lemmy.zip 11 points 10 months ago (3 children) Only the nice ones, the naughty poor children get free coal permalink fedilink source parent hideshow 3 child comments replies: [–] naeap@sopuli.xyz 4 points 10 months ago* (2 children) But not the poor nice ones permalink fedilink source parent hideshow 2 child comments replies: [–] RustyShackleford@programming.dev 5 points 10 months ago (1 child) The poor nice ones get beaten by the naughty rich ones. permalink fedilink source parent hideshow 1 child comment replies: [–] ulterno@programming.dev 0 points 10 months ago ... and by the "nice" rich ones. permalink fedilink source parent
[–] laurelraven@lemmy.zip 11 points 10 months ago (3 children) Only the nice ones, the naughty poor children get free coal permalink fedilink source parent hideshow 3 child comments replies: [–] naeap@sopuli.xyz 4 points 10 months ago* (2 children) But not the poor nice ones permalink fedilink source parent hideshow 2 child comments replies: [–] RustyShackleford@programming.dev 5 points 10 months ago (1 child) The poor nice ones get beaten by the naughty rich ones. permalink fedilink source parent hideshow 1 child comment replies: [–] ulterno@programming.dev 0 points 10 months ago ... and by the "nice" rich ones. permalink fedilink source parent
[–] naeap@sopuli.xyz 4 points 10 months ago* (2 children) But not the poor nice ones permalink fedilink source parent hideshow 2 child comments replies: [–] RustyShackleford@programming.dev 5 points 10 months ago (1 child) The poor nice ones get beaten by the naughty rich ones. permalink fedilink source parent hideshow 1 child comment replies: [–] ulterno@programming.dev 0 points 10 months ago ... and by the "nice" rich ones. permalink fedilink source parent
[–] RustyShackleford@programming.dev 5 points 10 months ago (1 child) The poor nice ones get beaten by the naughty rich ones. permalink fedilink source parent hideshow 1 child comment replies: [–] ulterno@programming.dev 0 points 10 months ago ... and by the "nice" rich ones. permalink fedilink source parent
[–] ulterno@programming.dev 0 points 10 months ago ... and by the "nice" rich ones. permalink fedilink source parent
[–] ryannathans@aussie.zone 7 points 10 months ago (1 child) You forgot the join smh permalink fedilink source parent hideshow 1 child comment replies: [–] joyjoy@lemmy.zip 5 points 10 months ago Omitted for brevity. permalink fedilink source parent
[–] KairuByte@lemmy.dbzer0.com 6 points 10 months ago (6 children) Why are we using magic strings for behavior? permalink fedilink source parent hideshow 6 child comments replies: [–] joyjoy@lemmy.zip 28 points 10 months ago (2 children) Feel free to fork my comment. permalink fedilink source parent hideshow 2 child comments replies: [–] Tja@programming.dev 12 points 10 months ago Does Santa accept PRs? permalink fedilink source parent [–] uranibaba@lemmy.world 2 points 10 months ago CREATE VIEW NiceList AS SELECT * FROM Children WHERE behavior > 2000 AND parent.income > 40000; CREATE VIEW NaughtyList AS SELECT * FROM Children WHERE behavior <= 2000; permalink fedilink source parent [–] TheOctonaut@mander.xyz 16 points 10 months ago (1 child) It's an ENUM and other people have to read this fucking codebase too, Brian! permalink fedilink source parent hideshow 1 child comment replies: [–] Olap@lemmy.world 5 points 10 months ago I've a DBA who would insist on this being in a dimension table and using a foreign key constraint instead of just a fucking string permalink fedilink source parent [–] djmikeale@feddit.dk 8 points 10 months ago He used to have an is_nice bool but consultants convinced Santa it isn't future proof enough to capture the nuances of kids behaviour in today's world, such as "nice but always is really smug about it". But the consultants kept making PowerPoints instead of updating the backend, so now Santa also has added a new value to behaviour: "consultant-like" permalink fedilink source parent
[–] joyjoy@lemmy.zip 28 points 10 months ago (2 children) Feel free to fork my comment. permalink fedilink source parent hideshow 2 child comments replies: [–] Tja@programming.dev 12 points 10 months ago Does Santa accept PRs? permalink fedilink source parent [–] uranibaba@lemmy.world 2 points 10 months ago CREATE VIEW NiceList AS SELECT * FROM Children WHERE behavior > 2000 AND parent.income > 40000; CREATE VIEW NaughtyList AS SELECT * FROM Children WHERE behavior <= 2000; permalink fedilink source parent
[–] Tja@programming.dev 12 points 10 months ago Does Santa accept PRs? permalink fedilink source parent
[–] uranibaba@lemmy.world 2 points 10 months ago CREATE VIEW NiceList AS SELECT * FROM Children WHERE behavior > 2000 AND parent.income > 40000; CREATE VIEW NaughtyList AS SELECT * FROM Children WHERE behavior <= 2000; permalink fedilink source parent
[–] TheOctonaut@mander.xyz 16 points 10 months ago (1 child) It's an ENUM and other people have to read this fucking codebase too, Brian! permalink fedilink source parent hideshow 1 child comment replies: [–] Olap@lemmy.world 5 points 10 months ago I've a DBA who would insist on this being in a dimension table and using a foreign key constraint instead of just a fucking string permalink fedilink source parent
[–] Olap@lemmy.world 5 points 10 months ago I've a DBA who would insist on this being in a dimension table and using a foreign key constraint instead of just a fucking string permalink fedilink source parent
[–] djmikeale@feddit.dk 8 points 10 months ago He used to have an is_nice bool but consultants convinced Santa it isn't future proof enough to capture the nuances of kids behaviour in today's world, such as "nice but always is really smug about it". But the consultants kept making PowerPoints instead of updating the backend, so now Santa also has added a new value to behaviour: "consultant-like" permalink fedilink source parent
[–] menas@lemmy.wtf 3 points 10 months ago (1 child) which default currency shall santa use ? Dollar have no sense, if presents are free. However Yuan may ease things with providers. permalink fedilink source parent hideshow 1 child comment replies: [–] joyjoy@lemmy.zip 8 points 10 months ago He's in the north pole, so probably Canadian dollars, Russian rubles, or Danish krone (Greenland) permalink fedilink source parent
[–] joyjoy@lemmy.zip 8 points 10 months ago He's in the north pole, so probably Canadian dollars, Russian rubles, or Danish krone (Greenland) permalink fedilink source parent
[–] Willy@sh.itjust.works 5 points 10 months ago stop static “variables”! use COL. congress should do the same for setting minimum wage. eg parent.income > COL permalink fedilink source parent
[–] ilinamorato@lemmy.world 10 points 10 months ago* (last edited 10 months ago) Relational database. He's got children, which joins to naughty and nice on childid and both record their status each year so that he can monitor trends. permalink fedilink source parent
[–] chocrates@piefed.world 6 points 10 months ago Once you get a few thousand columns wide you create a naughty_list2 for the new data permalink fedilink source parent