• skulbuny@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    24
    ·
    2 months ago

    I learned early in my software engineering career these two beautiful rules of debugging:

    1. Read all of the words
    2. Believe them
    • ich_iel@feddit.org
      link
      fedilink
      arrow-up
      10
      ·
      edit-2
      2 months ago

      Unless you were the one writing the program and its error messages - then check, that you didn’t mess up there…

    • smeg@feddit.uk
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 months ago

      Addendum to 2: never believe that what they say is relevant to what’s actually happening here. You have a lot of faith that the people writing error messages knew what they were doing!

      • Trainguyrom@reddthat.com
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 months ago

        Having written some error messages in a godforsaken database frontend, an error message only means that something didn’t work correctly and may or may not correctly indicate what is actually wrong

      • skulbuny@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 months ago

        I mean, if the error says “variable foo is not defined” I don’t think it’s wise to go “I’m pretty sure it’s defined, the compiler is just wrong” 😂

        • Ethan
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 months ago

          I don’t know, have you ever used JavaScript? I’ve run into some really fucking weird bugs. I’ve also spent hours trying to find the source of an error message only to discover the error message was lying and caused by some other error.