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

Cyberpunk

1525 readers
3 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
[–] theneverfox@pawb.social 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