• FaceDeer@fedia.io
    link
    fedilink
    arrow-up
    5
    arrow-down
    7
    ·
    1 month ago

    Indeed, my code has never been more rich in unit tests now that coding assistants make them so easy to add. If the coding assistant subsequently does something weird that changes program behaviour it knows immediately.

      • FaceDeer@fedia.io
        link
        fedilink
        arrow-up
        2
        arrow-down
        5
        ·
        1 month ago

        They check to make sure that the code continues producing the expected results. For example if I had some code that added up numbers, I might have a unit test that calls that function with the parameters “2” and “2” and checks to make sure the result is “4”. If something changes that makes it start returning something else then a flag is immediately raised.

        • resipsaloquitur@lemmy.cafe
          link
          fedilink
          English
          arrow-up
          7
          arrow-down
          3
          ·
          1 month ago

          Are these tests written by AI? Have you reviewed the tests? Do they cover all code paths and all the possible inputs and outputs? Do the tests have requirements cited (traceability)?

            • resipsaloquitur@lemmy.cafe
              link
              fedilink
              English
              arrow-up
              8
              arrow-down
              2
              ·
              1 month ago

              Absolutely not. In a world where hallucinating machines are writing code, humans should be writing the tests at a bare minimum.

              AI writing code to pass tests written by AI will get people killed.

                • resipsaloquitur@lemmy.cafe
                  link
                  fedilink
                  English
                  arrow-up
                  6
                  ·
                  1 month ago

                  Boeing’s executives had motivated reasoning to skimp on actual engineering and give the results the exec wanted over the objections of actual engineers.

                  Sound familiar?

                  Frankly, no. LLMs are so sychophantic, there’s little evidence they would have flagged a warning that what he executives wanted was dangerous.

                  And no, LLMs are not just some tool. Never in human history has a hammer given it’s users psychosis.

                  This is a completely nonsense argument.

                • unknownuserunknownlocation@kbin.earth
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  1 month ago

                  The max issue on the Boeing planes wasn’t a software issue in that sense. The software actually worked as intended. Boeing just hid the fact that the software existed and made it purposefully hard to override, giving pilots quite the surprise when the plane didn’t operate the way they expected, especially when the angle of attack sensor wasn’t working.