2.2.2 · D1Design Principles

Foundations — KISS — Keep It Simple

1,596 words7 min readBack to topic

Before you can trust that claim, you must be able to read every mark on the parent page. This note takes each one, gives it plain words, draws its picture, and says why the topic can't live without it. Read top to bottom — each block leans on the one above it.


1. "Piece" — the atom of everything here

The parent note keeps saying "moving parts" and "interacting pieces." That word is doing real work, so we pin it down first. Everything else — the counting, the formula, the whole argument for simplicity — is built out of pieces.


2. — a name for "how many pieces"

We use a letter instead of a fixed number because we want to reason about any size at once. Writing lets us say "whatever the count is, here is what happens" — one sentence covers every function that will ever exist.


3. "Interaction" and the pair picture

The parent claims the reader's burden is not the number of pieces but the number of ways pieces can affect each other. That word — interaction — needs a picture before its formula appears.

Figure — KISS — Keep It Simple

Look at the red lines in the figure. With 3 dots there are 3 lines; with 6 dots there are 15. The dots barely doubled, but the tangle of red lines exploded. That red web is what "cognitive load" actually looks like. This picture is the whole reason KISS matters — hold it in mind.


4. The binomial symbol — "choose 2"

Now we can read the parent's central formula. It uses a notation that looks scary but asks a simple question.

Why this exact tool and not something else? A reader's burden is the number of pairs (interactions), and is the mathematics of counting pairs. That is why it, and not itself or , shows up.


5. — "roughly equal"

We need this symbol so nobody mistakes the formula for a law of nature. It's a lens for intuition, and is the honesty flag that says so.


6. and "quadratic" — the shape of the cost

Figure — KISS — Keep It Simple

The red curve is the punchline of the whole topic: you add pieces one at a time (straight line), but the reader pays for them in pairs (curve). Cutting a few pieces near the top of the curve deletes a huge chunk of load. That gap between the black line and red curve is exactly why KISS repays effort super-linearly.


7. "Guard clause / early return" — the flatten picture

The parent's refactors lean on one shape you must be able to see, not just read.

Figure — KISS — Keep It Simple

On the left, three nested ifs force the reader to hold all three conditions open at once — that's the red tangle again. On the right, each guard is handled and dropped before the next begins, so at any moment only one condition is live. Same logic, far fewer simultaneous interactions.


8. Words the parent borrows from neighbours

Recall Where these names point

"Simple = easy to read and reason about" is the whole aim of Code Readability; a formal meter for the branch-count is Cyclomatic Complexity.


Prerequisite map

Piece = one moving part

n = count of pieces

Interaction = a pair of pieces

Choose 2 = count the pairs

Formula C = n times n minus 1 over 2

Quadratic = doubling n quadruples C

KISS pays off super-linearly

Guard clause flattens nesting

YAGNI and DRY avoid premature parts


Equipment checklist

Cover the right side and test yourself before reading the parent note.

What is a "piece" in this topic?
Any single thing a reader must track — a branch, variable, parameter, dependency, or call.
What does the symbol stand for?
The count of pieces in one function or module — a stand-in for any whole number.
What is an "interaction," in the picture?
One pair of pieces that can affect each other — a line between two dots.
What does ask?
Out of things, how many different pairs can you pick.
Why does ?
choices for the first, for the second, divide by 2 because each pair was counted twice.
Why the symbol in ?
It flags a rough model, not an exact law.
What does "quadratic" mean in one sentence?
Doubling the input roughly quadruples the output.
What does a guard clause do to nesting?
Replaces nested boxes with early exits so only one condition is live at a time.
Which neighbour principle cures speculative generality?