Probably not a good title to seek upvotes. If it does get upvotes, more programmers get share in your pain 😅

  • xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    54
    ·
    3 days ago

    Figure out if they prefer spaces or tabs, insist on the other.

    Please note this won’t work on Pythonistas as they’ve already had their spirit thoroughly broken.

    • untorquer@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      I’ve only ever heard raging between the two, but never why. I’m guessing there were competing languages with different standards, or maybe historic hardware limiting input sets that kicked this debate off or?

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        A few languages force a decision (usually towards tabs), but otherwise it’s just a question of aesthetics vs. accessibility.

        • untorquer@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          23 hours ago

          I see.

          My worst experience was with spaces in code from an engineering professor who used a non-monospace typefont. Sadist. Though it was comic sans, they were probably just dyslexic. Despite the class focusing on numerical methods, we had to hand write Matlab code on paper using proper syntax. I have no clue why. Never learned much numerical method, nor were we ever allowed to use Matlab except on a few “projects” during the term. I found out about the spaces when i had to debug his example code he gave as solutions(which we were graded against). I saw errors and had to confirm i wasn’t losing my mind. …I wasn’t. Anyways there was a mix of spaces and tabs to align the comic sans.

          TLDR: I couldn’t care less. Just don’t code in word, and use a monospace font.

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        5
        ·
        2 days ago

        Hard tabs are much better as someone who works with an age diverse team where vision issues are a serious issue. Four space tabs are optimal for you but there are other lived experiences.

      • brian@programming.dev
        link
        fedilink
        arrow-up
        9
        ·
        2 days ago

        most things seem to have settled on this, but tabs are so much better for accessibility. programmers with bad vision can have trouble differentiating smaller indentation levels, while some of them just bump the font size up so high that 4 spaces takes up too much screen space. each one can set a tab width that is comfortable for them. https://alexandersandberg.com/articles/default-to-tabs-instead-of-spaces-for-an-accessible-first-environment/ has some good arguments

        with a forced formatter and a configured editor there really isn’t any argument for spaces

    • ThePunnyMan@lemm.ee
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      For python, see which one they use and secretly replace a single indentation with the other.