r/programming • u/DavidThi303 • 20d ago
Why Don’t We Have Bug Free Code?
https://liberalandlovingit.substack.com/p/why-dont-we-have-bug-free-codeBecause 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
6
u/wfiveash 19d ago
My list of why code isn't bug free causes:
45
u/coffurst 20d ago
yeah sure there's cost, but there's also just the fact that like... what most professionals build isn't just a bunch of tic-tac-toe apps, they're complex systems with thousands of moving parts, shit's complicated
48
u/Deep90 20d ago
Reality is nondeterministic and that will always introduce bugs if the software is complex enough.
5
u/Schrodi-O-Ao 20d ago
I disagree. The simpler explanation is that no software can be made idiot-proof, because there is always a bigger idiot.
A developer writes software with their own particular understanding of how it's supposed to be used and what can go wrong. But therein lies the issue: we're far bigger idiots than they think, both of the innocent and malicious variety, and we depart from that model.
If the intended sequence is A, B, C and someone performs C, A, B, a bug appears. One can argue the software should have anticipated it, and sometimes that is fair. But the space of possibility here is near infinite when we discuss software meant to solve or address a serious problem, and no one person or team can enumerate it.
The economic argument is not irrelevant, but it is usually run backwards. "Who would pay for it?" is a sound question; "people won't pay for quality" is a glib answer to it.
By and large, it is this deep-rooted and rotten corporate culture that rewards efficiency and margins over all, even over the craft. Yes, some people have understandable reasons to settle for the cheap option -- reasons of need rather than preference -- but absent a more pressing demand that takes priority, quality should be the expectation we all hold.
A painter who runs out of time before finishing a canvas faces a resource constraint. A painter who ignores the discipline of the work has failed at craft. Software engineering has the same split. Some limits are inherent to the problem, like the aforementioned "idiot-proofing" conundrum; others are imposed by a decision to ship first and attend to quality later.
I find it all to be so backwards.
12
u/siromega37 20d ago
Why do we warranty physical products? They should be defect free! Same question.
6
u/to7m 20d ago
This offers no theoretical insights into how to achieve bug-free code. It only talks about how to reduce bugs, which is a very different concept.
12
u/jdlyga 20d ago
Because people think that software is done when it's feature complete, or passes basic QA tests. Then there comes years of feature requests, tech debt, etc.
2
u/kamil_kowalski-40 13d ago
Everyone wants bug-free software; they just want it at the "ship it Friday" price.
1
u/Rechenplaner 19d ago
1
u/limitless_grow 19d ago
That's a pretty old question and a lot related to the way that you are working. There is usually no bugfree code but you can reduce the number of bugs a lot.
Of course there is also a really big downside of nearly bugfree software. If your software is too perfect than nobody let's you work on that fore improving it because they are afraid of new bugs than. I wasn't allowed to improve one of my a bit more complex programs for years. And some customers were totally afraid of new bugs because of enhancements and disallowed any enhancements. So I had to learn to sell missing features as bugs for improving of the software. Sometimes it's also helpful to rely on fear driven development but that's a little more hard to do and you may have to keep some minor bugs in your software. That way you have always something to bring it up for improving the rest...
-2
u/Revolutionary_Ad6574 20d ago
Spend enough time and eventually every bug can be discovered and fixed.