News for hackers. Stuff that matters.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ConcernedCoder on Monday June 28, 2021 @03:11PM (#27666364)
Can there ever be 'bug free' software? As a lifelong programmer, I'm starting to think that it's impossible to write perfect software free from bugs.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Symbiote on Monday June 28, 2021 @03:28PM (#27666627)
In some cases, yes. See Software Verification [1] for some pointers.

It's massively more expensive, so you'll see it used in aerospace, railway signalling, some vehicles (trains, components of some cars), power generation and distribution, industrial processes.

Sometimes also in consumer products that have long warranties and are extremely expensive to recall/repair, like washing machines.

Just yesterday was a post on a formally-verified C compiler, used by Airbus (and others) [2]

[1] https://en.wikipedia.org/wiki/Software_verification

[2] https://news.ycombinator.com/item?id=27648735

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by kube-system on Monday June 28, 2021 @05:17PM (#27668281)
Software verification can make a system ≈ bug free from a pragmatic perspective, but, there are still holes: humans do the verification, and there are practical limitations to the scope of system and integration tests. The fact that we still find zero-days (and other bugs) on systems that have gone through software verification is evidence of this.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by staticassertion on Monday June 28, 2021 @03:58PM (#27667065)
Can a single program be proven bug free? Sure. Can we do that for arbitrary programs? No.

This may interest you: https://en.wikipedia.org/wiki/Rice's_theorem

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by dragonwriter on Monday June 28, 2021 @03:31PM (#27666681)
> Can there ever be 'bug free' software?

Sure. And if you look at sufficiently small-scale pieces of software, there is probably a lot. As scope of a software system increases, the probability of bugs rapidly approaches unity, though.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by toast0 on Monday June 28, 2021 @03:50PM (#27666962)
It depends on what you mean by bug. Often, requirements change, and now the program doesn't meet requirements; that's not something you can avoid.

Ensuring your requirements are correct is possible, but often hard. Ensuring your software meets the requirements is possible, but often hard, especially if you need to consider hardware failure or defects.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by jhickok on Monday June 28, 2021 @03:30PM (#27666658)
Technically, I don't see why it would be impossible. Seems like it is incredibly unlikely.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by 71a54xd on Monday June 28, 2021 @04:11PM (#27667300)
> Can there ever be 'bug free' software?

Only in academia

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ma2rten on Monday June 28, 2021 @03:18PM (#27666452)
I thought that was conventional wisdom.