Laws and principles

Software development has accumulated a folklore of laws, rules, principles, and philosophies. Some are informal observations, some are backed by data, and some are no more than adages, but they all compress hard-won lessons into a memorable abstraction.

Some laws and principles describe forces that act on software regardless of process or technology. Conway’s and Metcalfe’s laws are examples. Others are heuristics for individual or team behavior, such as the boy scout rule and bike shedding. A handful, like Goodhart’s law, are cautionary tales about what happens when a measure is mistaken for the thing it measures.

The following laws and principles are distinct from design principles, which guide the shape of a computer program itself. The best known example is probably the five SOLID design principles. The laws and principles listed below tend to operate at the scale of teams, projects, and organizations, rather than statements, classes, and modules. But a few, such as the Law of Demeter, sit close to that boundary.

Index of laws and principles