• aaaantoine@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    That’s because these programmers are getting paid by the character.

    This is also why Java dev pays so well.

      • Eavolution@kbin.social
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Or the slightly more readable brainfuck:

        ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

        • ReakDuck@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Hey! Brainfuck is a fun puzzle language and nothing someone does at a job to do money per character. Would be funny if yes

  • Lanthanae@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I’d imagine it’s because people who use spaces are either further in their career in average (because the modern programming ecosystem in general uses tabs so new devs are more likely to only know that) or they’re just more serious about software development because the kind of person to die on that hill is also the kind of person who is very obsessive about other things as well.

    • zalack@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Wait. Are tabs used more often in modern stuff? Almost everything I use does spaces and I’m not that new to programming. Been doing it for maybe 5 years. I use spaces in everything but Go.

      • Lanthanae@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        0
        ·
        2 years ago

        Most text editors people use (like VSCode) generally automatically adjust tabs to be whatever the standard indent is for the project (and convert to spaces if it’s necessary). As a result, indenting with tabs usually just works, and so most people just learn to do it that way. Also people are used to using tabs for indent from things like Word which they used before learning to write code. As a result, I’ve noticed most people use the tab key (even if their not technically “using tabs” every time they do it).

        • zalack@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Yeah, I have my tab key set up to insert spaces. I meant the characters being used, not the key used to write them.

  • noisytoot@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    Seven semicolons are the correct way to do indentation (it even alliterates):

    int main
    (void) {
    ;;;;;;;printf("like this\n"); }
    
    • dystop@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 years ago

      the correct way is to never indent and never use whitespace. Saves memory.

      Your goal should be 1LOC every month, no more.

  • GNU/Dhruv@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    Is this some kind of python meme I’m too C++ to understand?

    Now, I’m completely willing to start a war about { going on the next line.

    • TheInsane42@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 years ago

      Totally agree, all my { end up on the next line, 1st spot when starting a function, last character of the keyword when starting an if/for/… section. I even put the closing one on the same line when it’s single line, else either at the end of the closing line (when changing really old code) or same indent.

      So indenting varies a lot, which makes most ‘new’ programmers go mental.

      while (my code)
          { I'll do it my way }
      
      if (! liked)
       { toughen-up }
      else
       { get used to it
         multi-line can go both ways...
       }
      

      That is, unless the font used messes it up. ;)

  • Demonen@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I use tabs because I prefer 4-space indents and others might prefer 2-space indentation or the gross and unacceptable 6-space indentation.

    If more than one person is working on a code base, there will likely be more than one preference, and with tabs everyone gets to just set their own tab width.

    Yes, even the 3-space savages.

    • noisytoot@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Tabs work fine as long as you don’t align stuff. If you do, you have to assume a tab size and mix tabs and spaces.

  • UpperBroccoli@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    [ ] tabs [ ] spaces [x] why would I even care, I press tab and the editor puts either a tab or a number of spaces, couldn’t care less…