• markstos@lemmy.world
    link
    fedilink
    English
    arrow-up
    34
    ·
    1 year ago

    Solution: Code Style Guidelines doc that the team agrees on. A checkbox in the PR template that affirms that code is compliant with the guidelines.

    This way it’s not personal, it’s a rule that everyone should follow as a shared standard.

      • GBU_28
        link
        fedilink
        English
        arrow-up
        7
        arrow-down
        1
        ·
        1 year ago

        Use cicd tooling to enforce it not human eyes

      • ripcord@kbin.social
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        1 year ago

        This sadly sounds like one of the projects on my teamat the moment and it’s horrifying.

        One guy working on it, I’m really the only reviewer. Code is all stuff like this. Variables named j1 through j20, dozens and dozens of nearly identical functions with tons of brute force, copy-pasted code, etc. Works well enough but it’s just horrifying to try to read and review.

        Edit:. Just remembered, he had all these grouped functions passing (and sometimes returning) 60+ identical variables that didn’t need to be local because he refused to use class vars, etc.

        He’s gotten a lot better about this stuff in the last year though

        • whofearsthenight
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          1 year ago

          You know, as an amateur with massive impostor syndrome who’s probably going to be applying for jobs soon, this comment and those like it give me strength.

      • iHUNTcriminals
        link
        fedilink
        arrow-up
        1
        arrow-down
        6
        ·
        1 year ago

        enforce it

        Stop right there. This idea does not exist in a workplace setting