this post was submitted on 26 Dec 2023
281 points (97.3% liked)

Cyberpunk

1541 readers
1 users here now

A transhumanistic edge of society in dystopia. Daily life has been impacted by rapid technological takeover.

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 11 points 10 months ago (2 children)

Humans can't write bug-free code, it's beyond us.

With space, they literally write more multiple lines of specs for each line of code, test the crap out of it, build a ton of redundancy, and have many people go over every line with a fine toothed comb. It's a very long and painful process, and they still have bugs

The defense industry and aviation isn't that amazing - they just have insane budgets, iterate for a long time, and (usually) have someone there ready to take control. It takes them years to perfect anything too

I do agree software is sucking way too much these days though. I think it comes down to a) most projects don't get the years of maturation you need to make something rock solid b) developers have to frequently change jobs because they're rarely given raises for some reason... And one dev isn't as good as another and c) you don't make money by making good software. You make money by making it fast, and finding a way to monetize it heavily

There's also the fact that modern software is built with endless layers of open source libraries, and there's basically no money there. They get abandoned or replaced all the time, and changing/upgrading them is an ongoing process.

I also have a theory that COVID has made the whole situation much worse, and the economics of it have recently gotten much worse

[–] [email protected] 3 points 10 months ago

Humans can’t write bug-free code, it’s beyond us.

Hey, my CS professor said my Hello World was perfect!

[–] [email protected] 1 points 10 months ago (1 children)

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] 2 points 10 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