General
I wrote three rules on Saturday. I broke all three on Saturday.
Mahiro Hirakawa DEV Community 周榜
1 views
A long working day produced three lessons. Each got written down as one sentence in the log, the way a good lesson should be:
1. Name a task's success criterion by the line it will print, never by a phrase.
2. Regenerate the derived index before mirroring the tree, not after.
3. A bulk removal runs every reader of the thing being removed, not just the classifier.
Three clear sentences, each earned by an actual failure that cost actual hours. All three were violated again before the same day ended.
It was not a discipline problem
I want to be precise about this, because the comfortable reading is that I was tired and should have been more careful.
I knew all three rules. I had written them myself, that day, in a file I had open. At the moment each one applied I was not thinking about rules at all. I was thinking about the task, which is the correct thing to be thinking about, and that is exactly when a sentence in a log provides no resistance whatsoever.
A sentence has no enforcement surface. Nothing consults it. The gap between writing a rule and needing it is measured in hours and in context switches, and a rule that lives only in a document loses every one of those.
What survived versus what did not
The interesting number is not three violations. It is that the rules already implemented as devices were not violated, because violating them was not available.
rule
form
violations that day
name success by its print
sentence
1
index before mirror
sentence
1
removal runs every reader
sentence
1
a control must not write the real data store
device, refuses
0
a claim of having read needs a verified quote
device, refuses
0
The bottom two are not better rules. They are the same kind of rule, wired into something that stops.
Each sentence became a refusal
The repair was not to write the sentences more forcefully. Each one became a thing that declines to proceed.
$ plan --add task=rework --success="the merge is clean"
REFUSED success token 'the merge is clean' is not printed anywhere in this tree
success= must name a line some device actually emits
The planner now reads every print name the tree can produce and refuses a success criterion that is a phrase rather than a line. The first rule stopped being advice and became a thing you cannot type past.
The second became data. The step order moved out of my head and into a file, with a checker that reads it:
order = ["edit", "repin", "recite", "index", "mirror", "controls",
"append", "index", "accept", "record"]
The checker refuses an index regeneration while an edit is still in flight, and refuses to commit an index without the index's own success line present in the same run. There is no longer a version of the sequence that lives in my memory and can be reordered by hurry.
The third turned a one-off script into a tool with the readers declared as rows, so "run every reader" stopped meaning "remember which tools parse this" and started meaning "iterate a list that someone has to add to".
The shape underneath all three
Every one of these was the same failure wearing a different hat: a step performed by habit where it should have been performed by a device.
That gives a usable test for any rule you are about to write down:
Name the thing that will refuse. If you cannot, you have written a note, not a rule.
A note is still worth writing. It is the record of a real failure and it is what the device gets built from later. The error is counting it as a fix and moving on, because the next violation then looks like carelessness rather than like the predictable behaviour of an unenforced sentence.
Two things I keep
A rule applied by hand is a rule you will break, and you can measure how fast. Write the sentence, then count violations for a week before believing the problem is solved. Mine had a zero percent survival rate over about eight hours, which is more informative than any amount of confidence about my own carefulness.
Knowing a rule does not change behaviour at the moment the rule applies. At that moment your attention is entirely on the task, which is where it belongs. Design for that, rather than for a version of yourself who is thinking about process while doing work.
Read original: https://dev.to/mahirhir/i-wrote-three-rules-on-saturday-i-broke-all-three-on-saturday-5bd6
← Previous
How I Built Calculadora SIU CrediUPE: Automating Credit Calculation in SIU Guaraní
Next →
Ethernet Speed Evolution Reaches 1.6 Terabit Milestone
Related
What "Fully Automated" Actually Costs
General
0
DEV Community
Ethernet Speed Evolution Reaches 1.6 Terabit Milestone
General
1
DEV Community 周榜
How I Built Calculadora SIU CrediUPE: Automating Credit Calculation in SIU Guaraní
General
1
DEV Community 周榜
I built a free founders' agreement tool that stays in the browser
General
0
DEV Community 周榜
Comments0
No comments yet — be the first