Remember, if you're doing an if/switch block with hardcoded database keys, use a table to connect that data instead!

  • 1
    The same reason people use ORMs. Database avoidance. Why learn SQL when you can require a code push to fix a data issue 😋
  • 1
    It's worse than you think, they were getting all records directly from a controller and then they filtered and sent to the view only 1, 2, or all, based on hardcoded FKs......... 🤷🏼‍♂️
  • 1
    "...but..but...I would have to hard-code the table name!"

    Yes, that has been a successful argument here.
  • 1
    Why is it so fucking hard for some people to create views? 😐
  • 3
    The back and forth over decades was:

    - strong DBA org restricts permissions
    - developers wait months for DBAs to do anything (sprocs, views, indices, etc)
    - devs, tired of the bs write their own queries
    - dbas insist they should be the ones to review the queries, development is delayed
    - devs begin using ORMs so that no SQL is stored in src, DBAs are pacified, dev life is easier

    A decade passes, an entire half generation has never used anything other than ORMs, SQL is viewed as arcana, most DBA orgs have evaporated and rolled into IT maintenance. Now no one is watching the till, and there's no watchmen to speak of.
  • 1
    @SortOfTested I feel like you just summarized WWiii. Lol. Was too good.
Add Comment