Basic

Changing a page under a rule

A change is a rule with a limit. The rule is the reason a change can be undone, and the limit is the reason a change can be reviewed.

What you will see

refuse 41 and 20. Two numbers is the whole answer.

About 1 min of reading

Try It

Count a change against a limit

1

Write the limit

printf 'max_nodes 20\n' > /tmp/l.txt; cat /tmp/l.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One count. A count is reviewable, a feeling is not.
2

Count the change

printf 'a\nb\nc\n' | wc -l

Before you run it, say out loud what it will print. Then open the answer.

What it prints
3. The change is counted, which is what makes it reviewable.
3

Refuse a passed limit

printf 'touched 41 max 20\n' | awk '{print ($1>$3) ? "refuse 41 and 20" : "ok"}'

Before you run it, say out loud what it will print. Then open the answer.

What it prints
refuse 41 and 20. Two numbers is the whole answer.

Data Flow

A rule to a limited change
1 The rule names one kind of node
↓
2 The limit is written as a count
↓
3 The change is made and counted
↓
4 A passed limit refuses with both numbers
Why this works
Why the limit is a count and not a feeling

A feeling is not reviewable. A count is a number that a refusal can name when it is passed.

The failure at this step

A change that touches more than the limit. The count is the answer, and the count names both numbers.

Examples

The rule is one kind of node

One kind at a time. One kind is what makes the set of changes a list a reader checks.

The limit is a count

The most nodes touched. A count is what makes a change smaller than the page.

The change is reversible

The rule says how to undo. An undo that is written is an undo that a reviewer can run.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Reading a page as a query
Previous Lesson
Reading a page as a query
Next Lesson
A style as a class, never inline
A style as a class, never inline →