Chapter 42. The Fallacy of Perfect Execution

David Wood

image with no caption

IF YOU THINK YOU CAN CREATE FLAWLESS CODE if you work hard enough, don't be embarrassed. Many others have thought so, too. Unfortunately, it is not possible. Even in theory.

Arbitrary logic is hard to verify in the general case and hard, or impossible, to fully test. Drawing an analogy to the bricks and beams used in other construction-related activities, three researchers in the UK recently suggested that software is hard to verify because "there are no good, predictable building blocks. The elements out of which programs are constructed: statements, procedures, or objects, cannot be composed in a predictable fashion."

The building blocks of software don't snap together like Legos. They can be put together in so many ways that it is impossible to determine all of the combinations. That may be a decent working definition of Turing completeness.[14]Software is, in a word, complicated.

Tracing and verifying arbitrary logic in code may sound esoteric. How about the simpler job of tracing programmer intent? Surely we can talk to programmers and ask them what they meant. Unfortunately, programmer intent is generally lost within a few days of writing a code block, especially when requirements change or are inconsistently documented.

Programmers also change jobs, leaving undocumented or wrongly documented code behind. Source code rapidly ...

Get 97 Things Every Project Manager Should Know now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.