Basic

Reading a page as a query

A page is large and the part wanted is small. The query is the difference, and the difference is why a read is a decision rather than a walk.

What you will see

report wrong query. Zero written is what makes it findable.

About 1 min of reading

Try It

Prove a zero answer

1

Write the query

printf 'shape=h2 max=20\n' > /tmp/q.txt; cat /tmp/q.txt

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

What it prints
A shape and a count. The query is written down.
2

Ask and count

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. A count is what makes an empty answer a claim.
3

Report a zero

printf 'found 0\n' | awk '{print ($2==0) ? "report wrong query" : "ok"}'

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

What it prints
report wrong query. Zero written is what makes it findable.

Data Flow

A page to a small answer
1 The query is written as a shape and a count
↓
2 The page is asked with the query
↓
3 The answer is counted
↓
4 A zero answer is reported
Why this works
Why the query is written down

A written query is a query a reader changes. A query in a name is a query that cannot be argued with.

The failure at this step

A query that answers zero. The answer is the query, and the query is the whole fix.

Examples

The query names what it wants

A shape and a count. A count is what makes an empty answer a claim.

The read never changes

Reading and changing are two steps. Two steps is what makes a change reviewable before it happens.

An empty answer is reported

Zero is written. Zero written is what makes a wrong query findable.

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.

← The manifest as the contract
Previous Lesson
The manifest as the contract
Next Lesson
Changing a page under a rule
Changing a page under a rule →