Code Simplicity

The Universal Laws of Nature

The Universal Laws of Nature

Software

Purpose

  • I'm @zachfedor, a teacher.
  • I know that I know nothing.
  • I want to hold a discussion, not tell you what you're doing wrong.
  • I like playing the devil's advocate!

Credit

By Max Kanat-Alexander

"Code Simplicity:

The Fundamentals of Software"

Context

  • The author was a Chief Architect of the Bugzilla Project
  • There's no code samples, just anecdotes, observations, and his conclusions.
  • It's less than 70 pages, so go read the whole thing!

Labels

  • Fact: a true statement, piece of true information
  • Rule: advice to guide a specific decision, won't predict the future
  • Law: fact that will always be true, prediction of what will happen in the future

Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth.

Marcus Aurelius, Meditations

Facts, Rules, and Laws

Helpful

Controversial

Notable

Law

The purpose of software is to help people.

Fact

Every programmer is a designer.

Rule

Design is not a democracy. Decisions should be made by individuals.

Rule

The quality of your design should be proportional to the lifespan of the code.

Rule

You are safest if you don't attempt to predict the future and only act on immediate information.

Law

The longer your software exists, the more likely it is that any piece will have to change.

Law

The chance of introducing a bug is proportional to the size of changes you make.

Law

The desirability of a change is mostly affected by the effort of maintenance.
D = \frac{V_n + V_f}{E_i + E_m}
D = \frac{V_f}{E_m}

Rule

The best design allows for the most change in the environment with the least change in code.

Fact

The difference between a bad programmer and a good programmer is understanding.

Fact

Simplicity is relative.

Law

The ease of maintenance of software is proportional to the simplicity of its parts.

The End

  • Thanks for sharing your thoughts!
  • This was a small sample of the book so go read it if you're curious for more.
  • Let's keep the discussion going on the #front-end channel in Slack!

Code Simplicity

By zach fedor

Code Simplicity

The Universal Laws of Software adapted from the book by Max Kanat-Alexander

  • 950