Skip to Content
Beautiful Code
book

Beautiful Code

by Andy Oram, Greg Wilson
June 2007
Intermediate to advanced
618 pages
18h 15m
English
O'Reilly Media, Inc.
Content preview from Beautiful Code

Chapter 22. A Spoonful of Sewage

BryanCantrill

If you put a spoonful of sewage in a barrel full of wine, you get sewage.

Schopenhauer’s Law of Entropy

Unlike most things that we engineer, software has a binary notion of correctness: either it is correct, or it is flawed. That is, unlike a bridge or an airplane or a microprocessor, software doesn’t have physical parameters that limit the scope of its correctness; software doesn’t have a rated load or a maximum speed or an environmental envelope. In this regard, software is much more like mathematical proof than physical machine: a proof’s elegance or inelegance is subjective, but its correctness is not.

And indeed, this lends a purity to software that has traditionally only been enjoyed by mathematics: software, like mathematics, can be correct in an absolute and timeless sense. But if this purity of software is its Dr. Jekyll, software has a brittleness that is its Mr. Hyde: given that software can only be correct or flawed, a single flaw can become the difference between unqualified success and abject failure.

Of course, this is not to say that every bug is necessarily fatal—just that the possibility always exists that a single bug will reveal something much larger than its manifestations: a design flaw that calls into question the fundamental assumptions upon which the software was built. Such a flaw can shake software to its core and, in the worst case, invalidate it completely. That is, a single software bug can be the proverbial ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Good Code, Bad Code

Good Code, Bad Code

Tom Long
The Art of Clean Code

The Art of Clean Code

Christian Mayer
Strange Code

Strange Code

Ronald T. Kneusel
Five Lines of Code

Five Lines of Code

Christian Clausen

Publisher Resources

ISBN: 9780596510046Supplemental ContentErrata Page