Go to the first, previous, next, last section, table of contents.


Truth

Truth is not democratic.

Through Truths we apprehend our universe: Some found, some made.

Programming is to a great degree an art of creating new truths: We decide that one should not be be able to walk through virtual walls, and make it so. Our virtual world works to the extent that we succeed in maintaining our chosen truths.

(Monosyllables being forbidden to doctors of philosophy, such truths are called "invariants" in the trade.)

When constructing a complex system, it helps immensely to have clearly in mind from the outset the major truths which you wish to maintain, and to so structure your code that it is clear how these truths are maintained.

A frequently-overlooked development tool is the creation of code to verify your selected truths: Writing such code early in the project can save untold debugging time.

Finally: If, like Will Strunk, you believe that the reader is forever half sunk in the swamp, and that it is the duty of the writer to throw his man a rope whenever possible, you can hardly find a better way to do so than by clearly documenting the Truths your code is intended to maintain.


Go to the first, previous, next, last section, table of contents.