Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
andioop@programming.dev to Programmer Humor@programming.devEnglish · 8 hours ago

Little Timmy Tables

programming.dev

message-square
32
fedilink
697

Little Timmy Tables

programming.dev

andioop@programming.dev to Programmer Humor@programming.devEnglish · 8 hours ago
message-square
32
fedilink
  • unalivejoy@lemmy.zip
    link
    fedilink
    arrow-up
    55
    arrow-down
    1
    ·
    edit-2
    7 hours ago

    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'; 
    
    • NullPointerException@lemmy.ca
      link
      fedilink
      arrow-up
      35
      ·
      7 hours ago

      The income is a nice touch.

    • KairuByte@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      5 hours ago

      Why are we using magic strings for behavior?

      • djmikeale@feddit.dk
        link
        fedilink
        arrow-up
        1
        ·
        40 minutes 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”

      • The Octonaut@mander.xyz
        link
        fedilink
        arrow-up
        7
        ·
        4 hours ago

        It’s an ENUM and other people have to read this fucking codebase too, Brian!

        • Olap@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          22 minutes 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

      • unalivejoy@lemmy.zip
        link
        fedilink
        arrow-up
        7
        ·
        5 hours ago

        Feel free to fork my comment.

        • Tja@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          24 minutes ago

          Does Santa accept PRs?

    • criss_cross@lemmy.world
      cake
      link
      fedilink
      arrow-up
      7
      ·
      7 hours ago

      The poor kids can’t even afford coal and fall through the cracks.

    • ryannathans@aussie.zone
      link
      fedilink
      arrow-up
      4
      ·
      6 hours ago

      You forgot the join smh

      • unalivejoy@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        5 hours ago

        Omitted for brevity.

    • Willy@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      7 hours ago

      stop static “variables”! use COL. congress should do the same for setting minimum wage. eg parent.income > COL

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 916 users / day
  • 3.71K users / week
  • 8.7K users / month
  • 17.8K users / 6 months
  • 1 local subscriber
  • 27.9K subscribers
  • 1.58K Posts
  • 43.5K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org