• @ForgotAboutDre
    link
    111 months ago

    Defence and aviation do have larger budgets. But they also have much stricter standards, less volume and less options for hardware. They do verify and validate all their requirements and deliver functional tested code, buggy software in these industries is not the norm. The recent issues with Boeing was due to insufficient redundancy in hardware and manipulating regulators and testing procedures.

    They also (mostly) avoid these agile approaches that have people shipping junk code. They also do software engineering (designing software not just programming it).

    It is possible to write bug free code. It’s just more difficult and more costly. But it is completely feasible. Embedded systems only using well validated libraries are able to achieve this. Especially when you simplify the functionality. Software for critical systems should always be well tested and fault free. If software developers can’t achieve that then they should be reducing the functionality till the system is simple enough that they can achieve that. Your car should never need an update, just like it shouldn’t need a recall for a faulty part.

    Our current system for developing software is reliant on mountains of buggy code, which is in part due to how library’s are built and maintained like you said. The answer is to simplify these systems. But that doesn’t sell products, bells and whistles do even if they’re haphazardly stuck on.

    • @[email protected]
      link
      fedilink
      English
      211 months ago

      Bug free code really isn’t possible, at least not practically. Can you write a few hundred, maybe even a few thousand lines of elegant and robust code? Absolutely. Can your logic be without flaw perfectly describing what you want the code to do? Sure.

      Now run it. Hardware is a kind of code too - it’s where code and physics meet, and it’s where the term “bug” comes from… It was susceptible to literal bugs.

      Now either you’re writing in assembly, and your perfect little chunk of code does one fairly simple thing, or you’re relying on a language, which itself is going to have bugs.

      And maybe you’re a savant, but humans cannot reliably review and critique such low level language at scale, let alone maintain flawlessness as it grows in scale.

      And if you’re using a modern language, you’re probably using some layer of virtualization. This interface layer makes code run more predictably by creating strictly defined expectations for hardware. That itself can introduce bugs, but mostly has massively reduced them.

      There’s no perfect code. There’s always bugs, because we have no idea what we don’t know. It’s foolish to not account for that… That’s no excuse for the half-finished crap that’s being shoved out the door these days, but there’s no bug free code

      This isn’t just pedantics, there’s bugs all the time in space programs. They do about as much that is possible to reduce and mitigate them, but planning many redundant methods to recover from failure is why we lose so few of them despite that.

      It just happened with Voyager, they made a mistake with an update while trying to fix another bug, and introduced a bug had it flip away from Earth… Their first plan was to send a stronger signal from Earth and hope they could command it back, the backup was a pre scheduled command to rotate back towards Earth, using older code.

      Humans can’t write perfect code, but we can write good code. And good code recovers gracefully from failure