Appendix A. The Laws of Software Design

This appendix summarizes all of the actual laws discussed in this book:

  1. The purpose of software is to help people.

  2. The Equation of Software Design:

    image with no caption

    where:

    D

    Stands for the desirability of the change.

    Vn

    Stands for value now.

    Vf

    Stands for future value.

    Ei

    Stands for the effort of implementation.

    Em

    Stands for the effort of maintenance.

    This is the primary law of software design. As time goes on, this equation reduces to:

    image with no caption

    Which demonstrates that it is more important to reduce the effort of maintenance than it is to reduce the effort of implementation.

  3. The Law of Change: The longer your program exists, the more probable it is that any piece of it will have to change.

  4. The Law of Defect Probability: The chance of introducing a defect into your program is proportional to the size of the changes you make to it.

  5. The Law of Simplicity: The ease of maintenance of any piece of software is proportional to the simplicity of its individual pieces.

  6. The Law of Testing: The degree to which you know how your software behaves is the degree to which you have accurately tested it.

That’s it. Many more facts and ideas were discussed in this book, but these six items are the laws of software design. Note that of all of these, the most important to bear in mind are the purpose of software, ...

Get Code Simplicity 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.