• phoenixz@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Go with what works

    Error messages should contain the information that caused the error. Your average Microsoft error “error 37253” is worthless to me

    Keep functions or methods short. Anything longer than 20 - 50 lines is likely too long

    Comment why is happening, not what

    PHP is actually a really nice language to work with both for web and command line utils

    Don’t over engineer, KISS. Keep It Simple Stupid

    SOLID is quite okay but sometimes there are solid reasons to break those rules

    MVC is a PITA in practice, avoid it when possible

    • r1veRRR@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      PHP the language has become pretty nice, but I recently had to work with a PHP CMS deployment, and it was an absolute pain to do. PHP frameworks seem to still exist in a world where you manually upload code to a manually configured server running apache. Dockerizing the CMS (uses Symfony) is/was an absolute pain.

      • phoenixz@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        I know that there are loads of solutions out there that can do this for you, though I don’t have much experience with it myself directly. Not a great fan of docker, still, as it’s not a requirement and in many cases that extra piece that fails and then is a PITA to fix.

        I’ll look to include it in my own framework, though