Advanced

Quiet and loud as one dial with a default

A person wants less or more words. The dial is the answer, and the dial is honest only when the default is written and the level is printed.

What you will see

complaint still written. Off is not an option.

About 1 min of reading

Try It

Print a level with the answer

1

Read the level

printf 'level 2\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 level. A number per run is the dial.
2

Print with the answer

printf '42 level 2\n' | awk '{print $1, $3}'

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

What it prints
42 2. The level is printed with the answer, which is visible.
3

Prove the complaint stays

printf 'level 0\n' | awk '{print ($2==0) ? "complaint still written" : "ok"}'

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

What it prints
complaint still written. Off is not an option.

Data Flow

A dial to a printed level
1 The level is read from the words or the default
↓
2 The level is printed with the answer
↓
3 The answer is the same at every level
↓
4 The complaint is never turned off
Why this works
Why the level is printed on the answer

A level that is not printed is a level that is guessed. A guessed level is a run that looks different from the run that ran.

The one thing the dial never turns off

The complaint. A complaint that is turned off is a failure that looks like a success.

Examples

The dial is a level

A number per run. A number is what the answer prints with, and printed is what a reader sees.

The default is the middle

The middle is the default. The middle is what a person who meant nothing gets, and meant nothing is the common case.

The answer never changes with the dial

Never. The dial changes the words about the answer, not the answer, and the answer is the claim.

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.

← A dry run as the same code with a different write
Previous Lesson
A dry run as the same code with a different write
Next Lesson
A rename tool as a plan that is checked before it runs
A rename tool as a plan that is checked before it runs →