[Interest] OT: Bug-free code (Was: QtSVG deprecated)

Andreas Pakulat apaku at gmx.de
Thu Jan 12 17:18:47 CET 2012


On 12.01.12 08:50:47, Atlant Schmidt wrote:
> > > My over 20 years experience shows that there is no bug free software,
> > > there are bugs that either have not being found yet or just ignored.
> >
> > Well, one example of a bug-free application would be
> >
> > int main()
> > {
> >   return 0;
> > }
> >
> > Sure it does not do anything useful, but its pretty much bug-free. I
> > agree though that real-world applications always have bugs :)
> 
>   This piece of code *MIGHT* be bug-free considered
>   in isolation, but in a real world runtime environment
>   with dynamic linking and fancy scheduling, I'm pretty
>   sure you could detect anomalies in the execution of
>   even this simple code if you tried hard enough.

Sure, the environment might be buggy, but that does not change the fact
that this piece of software can be considered bug-free.

>   For example, what if a new process can't be created
>   so the shell can't fork-and-exec this process? What
>   if the handling of Flash memory failures delay the
>   execution of this code? Are those anomalies? And
>   remember, there's commonly in-process code that
>   executes before main() is called.

Ok, I shouldn't have said application when I really meant: 'this piece
of code' :). The above function is bug-free, executing it in a
buggy environment does not mean it suddenly has a bug.

Andreas
 



More information about the Interest mailing list