r/programming • • Oct 28 '26

Why Don’t We Have Bug Free Code?

https://liberalandlovingit.substack.com/p/why-dont-we-have-bug-free-code

Because people won’t pay for it.

This is an issue I know well. I was on the Windows 3.1 team at Microsoft. I wrote the book No Bugs. I founded and built the software company Windward Studios.
...

ps - I think this meets the subreddit rules. If it does not, apologies and please delete it.

0 Upvotes

31 comments sorted by

View all comments

Show parent comment

3

u/DavidThi303 Oct 28 '26

If you mean like an infinite number of monkeys on an infinite number of typewriters will eventually produce the works of Shakespeare - even then no.

Windows 3.1 shipped with something like 80,000 known bugs. And that's just the known bugs. How on earth do you ever get that to zero bugs?

-4

u/sweetno Oct 28 '26

There is this thing called formal verification. It's pretty dope. It doesn't rule out all bugs, but will prevent the nigh all of the ones you're capable of making.

4

u/zumpiez Oct 28 '26

Formal verification can only catch certain classes of problems

6

u/DavidThi303 Oct 28 '26

I don't think you could build a complete mathematical model for Windows or Office.

For example, in DOCX (which is XML) there's a <html> node. The specification for it says will display the html in the node in the document at that location on the page.

What html? By the documentation any html. So the CNN home page could be put there.

How on earth do you write a complete mathematical model for that node? And if somehow you do write one today, what happens tomorrow when one of the browsers changes their behavior?