Laws of architecture

A curated list of observations on software architecture

Hyrum’s Law

“With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.”

  • Hyrum Wright

Box’s Law

“All models are wrong,

but some are useful”

George E.P. Box

Conway’s Law

“Any organization that designs a system will produce a design whose structure is a copy of the organization’s structure.”

Melvin Conway

Jevon’s Paradox

The Coal Question (1865 – William Stanley Jevons)

As coal use became more efficient due to the advent of better quality steam engines, coal consumption rose rather than fell. 

Law of the instrument

“If all you have is a hammer, everything looks like a nail.”

Abraham Maslow

Law of the present

“Every company is a technology company, regardless of what business they think they’re in. A bank is just an IT company with a banking license.”

Christopher Little

Brook’s Law

“Adding human resources to a late project makes it later.”

Fred Brooks

Conceptual integrity

To make a user-friendly system, the system must have conceptual integrity, which can only be achieved by separating architecture from implementation. A single chief architect (or a small number of architects), acting on the user’s behalf, decides what goes in the system and what stays out.

(Paraphrased from The Mythical Man-Month)

The pilot system

When designing a new kind of system, a team will design a throw-away system (whether it intends to or not).

This system acts as a “pilot plan” that reveals techniques that will subsequently cause a complete redesign of the system. This second, smarter system should be the one delivered to the customer, since delivery of the pilot system would cause nothing but agony to the customer, and possibly ruin the system’s reputation and maybe even the company.

(Paraphrased from The Mythical Man-Month)

Law of usability

“Usability is the enemy of reusability”

“Mercenaries and auxiliaries are useless and dangerous, and if any one supports his state by the arms of mercenaries, he will never stand firm or sure, as they are disunited, ambitious, without discipline, faithless, bold amongst friends, cowardly amongst enemies.

The cause of this is that they have no love or other motive to keep them in the field beyond a trifling wage, which is not enough to make them ready to die for you.”

Niccolò Machiavelli

“And it should be considered that nothing is more difficult to handle, more doubtful of success, nor more dangerous to manage, than to put oneself at the head of introducing new orders. For the introducer has all those who benefit from the old orders as enemies, and he has lukewarm defenders in all those who might benefit from the new orders.”

Niccolò Machiavelli

Law of diffusion

“The future is already here; it’s just not evenly distributed.”

William Gibson

Law of abstraction

Architecture ≠ Design

Architecture Design
Fundamental properties Detailed properties
Define guidelines Communicate with developers
Cross-cutting concerns Details
High impact Individual components
Communicate with business stakeholders Use guidelines
Manage uncertainty Avoid uncertainty
Conceptual integrity Completeness

Law of the lightbulb

“If you give a good idea to a mediocre team, they will screw it up.

If you give a mediocre idea to a brilliant team, they will either fix it, or throw it away and come up with something better.”

Ed Catmull

Law of communication

“You cannot speak that which you do not know. You cannot translate that which you do not have. And you cannot give that which you do not possess. To give it and to share it, and for it to be effective, you first need to have it. Good communication starts with good preparation.“

Jim Rohn

Law of the bank

🎠

“The amount of shit in a company is a constant. What varies is who gets to clean it up.”

Law of the weasel

Shared responsibility

is no responsibility

Hanlon’s razor

Never attribute to malice

that which is adequately explained by stupidity

“Behold, the fool saith, “put not all thine eggs in the one basket” – which is but a matter of saying, “scatter your money and your attention”; but the wise man saith, “pull all your eggs in the one basket and – watch that basket.”

Mark Twain

All architecture is design

but not all design is architecture.

Grady Booch

Architecture represents the significant design decisions that shape a system, where significant is measured by cost of change.

A software architect who does not code is like a cook who does not eat.

Grady Booch

“Big design up front is dumb

but doing no design up front is even dumber.”

Dave Thomas

“I think there is a role for a broad starting point architecture. Such things as stating early on how to layer the application, how you’ll interact with the database (if you need one), what approach to use to handle the web server.”

Martin Fowler

“Base your architecture on requirements, travel light and prove your architecture with concrete experiments.”

Scott Ambler

“If I had asked people what they wanted, they would have said faster horses.”

Henry Ford

“There are no answers, only choices.”

Stanislaw Lem

Law of momentum

“Architects Live in the First Derivative.”

Gregor Hohpe

Just because you can doesn’t mean you should

“No battle plan ever survives contact with the enemy.”

Helmuth von Moltke

“As an architect, breadth is more important than depth. Because architects must make decisions that match capabilities to technical constraints, a broad understanding of a wide variety of solutions is valuable. Thus, for architects, the wise course of action is to sacrifice some of your hard won expertise and use that time to broaden your portfolio.”

Neal Ford

Dietzler’s law

“For framework X:

  • 80% of what the user wants is fast and easy.
  • the next 10% is possible but difficult.
  • the last 10% is impossible. Users want 100% of what they want.”

Terry Dietzler

Professionalism rant

Laborers take orders

Professionals profess

  • Hired for knowledge and expertise

Managers will push, and want push-back

  • Professionals push back.

Robert C. Martin

Single-responsibility Principle

“Gather together the things that change for the same reasons. Separate those things that change for different reasons.”

Robert C. Martin

“Programmers are expensive,

Hardware is Cheap.”

Karl Lehenbauer

“Rules of Optimization:

Rule 1: Don’t do it.

Rule 2 (for experts only): Don’t do it yet.

Michael A. Jackson

“Premature optimization

is the root of all evil”

Donald Knuth

“Well, software doesn’t quite work that way. Rather than construction, software is more like gardening – it is more organic than concrete.”

Andrew Hunt

Law of management

“The manager’s function is not to make people work, but to make it possible for people to work.”

Tom DeMarco

Law of retention

“Learning is limited by an organization’s ability to keep its people.”

Tom DeMarco

Rule of tincture

“Metals shall not be put on metals, nor colors on colors.”

“The architectural features of a product need to be evolved along with sprint deliveries.”

Chesterton’s fence

“Don’t ever take a fence down until you know the reason why it was put up.”

G.K. Chesterton

Postel’s Law

“Be liberal in what you accept. Be conservative in what you send. ”

Jonathan Bruce Postel

Gall’s Law

“A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system.”

John Gall

Ten thousand mistakes

A novice asked master Banzen: “What separates the monk from the master?”

Banzen replied: “Ten thousand mistakes!”

The novice, not understanding, sought to avoid all error. An abbot observed and brought the novice to Banzen for correction.

Banzen explained: “I have made ten thousand mistakes; Suku has made ten thousand mistakes; the patriarchs of Open Source have each made ten thousand mistakes.”

Asked the novice: “What of the old monk who labors in the cubicle next to mine? Surely he has made ten thousand mistakes.”

Banzen shook his head sadly. “Ten mistakes, a thousand times each.”

Sushi

Master Banzen had invited fellow master Suku to his domicile for lunch. On the table lay two great stacks of bowls, each several feet high.

Banzen reached up and took the topmost bowl from his stack. It was empty save for three grains of rice. He deftly snapped up each grain with his chopsticks and ate them.

Suku took the topmost bowl from her own stack. In it was only a single toasted sesame seed. With great difficulty she caught it between the ends of her chopsticks.

Banzen took another bowl. At the bottom lay a morsel of orange flesh. “Recently,” he said, “you advised a certain monk that it was wise to structure even the smallest application.”

Suku also took another bowl, discovering the tiniest sliver of cucumber. “I have found that with structure comes clarity and extensibility.”

“You will be pleased to hear that he is heeding your advice most eagerly,” said Banzen. “He now divides a hundred-line throwaway application into many classes.”

“Ah,” said Suku, reaching for the next bowl. It held two grains of rice. “You believe I counseled him poorly.”

“Injudiciously, perhaps,” said Banzen, struggling to scoop up a few dots of tobiko. “Any virtue, taken to extremes, becomes a vice. Incidentally, how is your sushi?”

“Is that what we’re eating?” asked Suku, considering the tall stack of bowls that still remained.

“I am not entirely certain,” said Banzen, studying a ribbon of nori at the end of his chopsticks. “I suppose we must go through all the courses before we can be sure.”

Stateless

It is the duty of every monk to call upon master Kaimu at least once during their time at the temple. When the master opens his door the monk must bow and ask: “What is the great joy of stateless services?”

Without fail master Kaimu will reply: “Ten thousand guests fed by a single grain of rice.”

The monk must then ask: “And what is the great sorrow?”

Kaimu will reply: “The great sorrow of what?”

Goodhart’s Law

“Any observed statistical regularity will tend to collapse once pressure is placed upon it for control purposes.”

Charles Goodhart

“When a measure becomes a target, it ceases to be a good measure.”

Marilyn Strathern

Kernighan’s Law

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”

Brian Kernighan

Murphy’s Law

“Anything that can go wrong will go wrong.”

Edward A. Murphy, Jr

Parkinson’s Law

“Work expands so as to fill the time available for its completion.”

C. Northcote Parkinson

The Two Pizza Rule

“If you can’t feed a team with two pizzas, it’s too large.”

Jeff Bezos

Tesler’s law

Some complexity in a system is inadvertent. It is a consequence of poor structure, mistakes, or just bad modeling of a problem to solve. Inadvertent complexity can be reduced (or eliminated). However, some complexity is intrinsic as a consequence of the complexity inherent in the problem being solved. This complexity can be moved, but not eliminated.

Lawrence Gordon Tesler

Ackoff’s law

“It is better to do the right things wrong than the wrong things right.”

Russel Ackoff

getting strategy right (doing the right things) should always precede focus on execution (doing things right).

“It’s better to solve the right problem approximately than to solve the wrong problem exactly.”

John Tukey

“Strategy without tactics is the slowest route to victory.”

“Tactics without strategy is the noise before defeat.”

Sun Tzu

“Simplicity is the ultimate sophistication.”

Leonardo da Vinci

Design by Contract

“Standardize on the gaps between services - be flexible about what happens inside the boxes”

Sam Newman