• Rusty@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    46 minutes ago

    You can add SQL in the 70s. It was created to be human readable so business people could write sql queries themselves without programmers.

    • ChickenLadyLovesLife@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      36 minutes ago

      Ironically, one of the universal things I’ve noticed in programmers (myself included) is that newbie coders always go through a phase of thinking “why am I writing SQL? I’ll write a set of classes to write the SQL for me!” resulting in a massively overcomplicated mess that is a hundred times harder to use (and maintain) than a simple SQL statement would be. The most hilarious example of this I ever saw was when I took over a young colleague’s code base and found two classes named “OR.cs” and “AND.cs”. All they did was take a String as a parameter, append " OR " or " AND " to it, and return it as the output. Very forward-thinking, in case the meanings of “OR” and “AND” were ever to change in future versions of SQL.

      • jacksilver@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        11 minutes ago

        Object Relational Mapping can be helpful when dealing with larger codebases/complex databases for simply creating a more programmatic way of interacting with your data.

        I can’t say it is always worth it, nor does it always make things simpler, but it can help.