Is it possible (in your opinion) that in the nearest future we would be able to create a bug-free software? Or it will be impossible despite all progress?
The reason that a bug can appear is due to human itself In my past 2 years I have produced bugs which of root causes can be:
Can technology help with it? I do believe technology can facilitate people to write less bug.
Can technology totally remove bugs? Anything that technology can replace must be specific, repetitive and accurately quantifiable. But since various people produce various types of bugs, personally I do not believe technology can remove bugs ( But I wish I could be wrong ).
A prerequisite would be a bug-free spec. and that ain't likely.
I believe it’s possible to some extent… otherwise I wouldn’t dare to travel by car or airplane (which contains millions of lines of code and a bug could mean life-or-death).
The question is, will we write our apps with the same level of rigor and precaution as those who write these airplane software? Or should we?
Complexity invites bugs. Less complex your requirement, less bugs.
For example, showing button on HTML page may not generate the bugs. But the button that triggers specific notification for say mobile and web in a different context at the same time releasing the data to database. And having additional activity dependent on such button click may invite bugs on different platforms and even on the server side.
In short your project complexity decides how many bugs can be generated and how many of them can be fixed. Also there is no such thing as bug free software. You can write bug free software for specific modern machines but people on legacy machines may have issue and so on.
Even if we could create software with no technical flaws, that doesn't guarantee it won't do something unexpected. "Bug" isn't really a 100% defined term, but generally anything which is "result not what user expected" could be considered a bug.
Plus we have code with self-learning/self-updating components, meaning it's not controlled code - it changes from a known state (what people wrote) to an unknown state (where it has ended up since then).
So... I think it's possible to write a piece of code which is technically bug-free within its scope/criteria. But we can never be sure those criteria remain correct over time. What people need from a tool can change, expectations can change, etc.
So within one definition, yes it's possible (and the FP fraternity can expand at length on that topic ;)). Within a more real-world definition looking further than code execution then no, not really. There will (probably!) always be gaps between what it does and what users want.
How can you make bug free if you dont have bug -/
Something I was taught VERY early on in programming was the mantra "the less code you write, the less there is to break". It's a bit trite, but it's also quite true.
As such the scale of the project -- and how much actual effort is willing to be put into it -- is the deciding factor.
The more code you blindly trust from other sources -- like frameworks -- the MORE likely you are to have things go wrong. The more you rely on things that let you avoid learning the underlying languages and technologies, the less capable and competent you will be at fixing things when they do go wrong.
... which is why all the sleazy "shortcuts" making wild unfounded claims about being somehow magically "easier" or "simpler" often leave beginners and ALLEGED experts alike completely hobbled when things break. That fundamental lack of understanding that drove them to the off the shelf answers in the first place is precisely what can cause bugs, EVEN when the code they are recycling or trusting had no bugs out of the box.
Of course it also depends on how you define a bug, or as Mozilla calls them "features".
The choice of programming language can also have a huge impact -- see security flaws and logic bugs where languages like Ada were carefully crafted so that such things simply would not and could not make it past the compiler.
Which is why the US fed ditching Ada to allow in C++ and other languages was 100% grade A herpa-freaking-derp.
There is a field concerned with mathematically proving the correctness of software. It's only feasible for somewhat small scale things I think, and only worth it for a few % of software tops.
But I interpret the question as asking whether we'll write some bug free software, and I'd say yes. If you mean all or any software, then no.
If I may take this opportunity to rant a little, I think most of us aren't trying nearly hard enough to write bug free software. Myself included. There are many fascinating new developments to be sure, but there are even more already proven tools that are decades old. Yet we're ignoring all of it and writing Javascript. Not really the fast lane to bugfree software. I mean, null was solved well before the start of the century, and most developers still haven't caught on.
Writing bug-free software is dependent upon people writing bug-free requirements. People will always ask for things and then realize later that what they asked for is not really or exactly what the want or need. I think AI will make it easier for engineers to write fewer bugs into software, but there's no good way to fix faulty human understanding of the problem we're trying to solve through software.
Tao Wen
it is not a bug, it is a feature