Someone had to do this before the riots started.

      • nous@programming.dev
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 day ago

        Once had a missing semi colon at the end of a c header file. The compiler kept complaining about the c file and never mentioned the header. Not all errors lead you to the right place.

        Though most of the time people just don’t read them. The number of problems I have solve for people by just copy pasting the error they gave me back to them…

      • wise_pancake@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        23 hours ago

        It’s super fucking annoying in Python when you forget a comma between strings and they get concatenated.

        The program usually runs just fine after that too.

      • bitcrafter@programming.devOP
        link
        fedilink
        arrow-up
        3
        ·
        1 day ago

        Ah, but you see, JavaScript is not so straightforward. It tries to help you by automatically inserting missing semicolons, but the approach that it uses is that it will insert them in the first place where doing so would make the code parse. This, unfortunately, means that semicolons are often inserted in places where you were not expecting them, so the advice is to always include them manually yourself so that you are never unpleasantly surprised.

        • anton@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          2
          ·
          12 hours ago

          This, unfortunately, means that semicolons are often inserted in places where you were not expecting them

          example:

          ()=>{
            return {k:"v"}; // returns the object
          }
          ()=>{
            return      // returns undefined 
              {k:"v"};  // unreachable 
          }
          

          so the advice is to always include them manually yourself so that you are never unpleasantly surprised.

          The example will be unpleasantly surprising, no matter where you put semicolons.

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 day ago

        It’s just the “Press Next until installation completes” mentality crossing over to the programming side.

        You see a dialogue with a red icon and escape it as fast as possible.
        You see red text, you just think it is an error and ignore what it says, expecting it to be useless (or maybe not expecting anything at all}


        Then when someone tells you to rad the errors, you read them and don’t find them useful because all those years of using computers, you didn’t learn to understand that stuff, no matter how easy it was.