• henfredemars@infosec.pub
    link
    fedilink
    English
    arrow-up
    6
    ·
    6 months ago

    I worked with a developer who insisted on using the shortest names possible. God I hated debugging his code.

    I’m talking variable names like AAxynj. Everything looking like matrix math.

    • redcalcium@lemmy.institute
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      6 months ago

      Ah, must’ve been a fortran developer. I swear they have this ability to make the shortest yet the least memorable variable names. E.g. was the variable called APFLWS or APFLWD? Impossible to remember without going back and forth to recheck the definition. Autocomplete won’t help you because both variables exist.

      • mkwt@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        6 months ago

        And you can write more than six characters, but only the first six are recognized. So APFLWSAC and APFLWSAF are really the same variable.

        And without namespaces, company policy reserves the first two characters for module prefix and Hungarian notation.

      • nogooduser@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        I don’t understand why people think that it’s acceptable.

        As developers, we’ve had it drummed into us from day one that variable names are important and shouldn’t be one or two letters.

        Yet developers deliberately alias an easy to read table name such as “customer” into “c” because that’s the first letter of the table. I’m sure that it’s more work to do that with auto completion meaning that you don’t even need to type out “customer”.

        • xmunk@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          6 months ago

          Especially when you also have company and county tables. It forces people to look up what the c is aliased to before beginning to comprehend what you’re doing.