# Bugs Will Always Exist

Recently I had a Twitter exchange with a colleague I respect, which included the following statements. (My own interjection is elided for dramatic effect.)

Consider:

It is a statistical certainty: bugs

But this is not a shield. This is a mantra. It exhorts me always to approach my work with humility and diligence. My software can only be stronger as a result.

```
I'm convinced that the "bugs will always exist" paradigm in software engineering is primarily due to ineptitude, rather than complexity.
— Matt Salzer (@matt_salzer) June 2, 2015
```

```
@cammerman I don't mean for this statement comes across absolute, and I'm not perfect. I'm just irritated by this prevalent mentality.
— Matt Salzer (@matt_salzer) June 2, 2015
```

```
@cammerman Software is the only field where a flaky product is an *acceptable* result. Imagine if civil engineering had such standards.
— Matt Salzer (@matt_salzer) June 2, 2015
```

Based on my shallow familiarity with the math of programming and the physics of computation, I expect that bugs are not only physically but mathematically inevitable in any real software system. I can only make my argument from a statistical standpoint, but I think this suffices.Consider:

- According to Turing's Halting Problem it is impossible to prove the correctness of a program without exhaustively testing over its input space.
- The behavior of most production software is determined not only by direct, immediate inputs, but also by the history of those inputs via database storage, and by temporal, environmental factors via connected systems, communication channels, and local hardware. This makes the "true" input to a software system at a point in time immensely complex and nuanced, in the mathematical terms required by the Halting Problem. If you view a program as a single, albeit complex, function, it's not far off to say that its input and output can be expressed in terms of the current and next "state of the world". This terminology is actually used, in some specialties.
- This is especially relevant when you consider that this essentially makes most modern software into a multivariate, discrete feedback system. Such systems are founded on assumptions of noise, error, divergence, and instability. Controlling these fringes in complex systems becomes fiendishly complex very quickly.
- In this age of the ubiquitous Internet and the blossoming Internet of Things the number of software systems connected to any given piece of software continues to compound, ballooning the complexity of the inputs and the outputs.

*finding*, let alone*resolving*, every significant bug vanishes into the infinitesimal.It is a statistical certainty: bugs

*will*always exist.But this is not a shield. This is a mantra. It exhorts me always to approach my work with humility and diligence. My software can only be stronger as a result.