McIlroy
tr -cs A-Za-z '\n' |
tr A-Z a-z |
sort |
uniq -c |
sort -rn |
sed ${1}q
Pattern ↔ Search
Example: sending a string
──┬─> close the channel
──┬─> close the channel
│
└────┬─> fixed length
──┬── close the channel
│
└────┬── fixed length
│
│
├── delimit ──┤
──┬── close the channel
│
└────┬── fixed length
│
│ (<)──── literal
├── delimit ──┤
──┬── close the channel
│
└────┬── fixed length
│
│ (<)──── literal
├── delimit ──┤
──┬── close the channel
│
└────┬── fixed length
│
│ (<)──── literal
├── delimit ──┤
“But what if the gym is on fire?”
──┬── close the channel
│
└────┬── fixed length
│
│ (<)──── literal
├── delimit ──┤
(≥)─┬── encode
>> b64encode('Null \0 SOH \001 DEL \177')
'TnVsbCAAIFNPSCABIERFTCB/'
──┬── close the channel
│
└────┬── fixed length
│
│ (<)──── literal
├── delimit ──┤
(≥)─┬── encode
│
└── escape
──┬── close the channel
│
└────┬── fixed length
│
│ (<)──── literal
├── delimit ──┤
│ (≥)─┬── encode
│ │
│ └── escape
│
└── length prefix
──┬── close the channel
│
└────┬── fixed length
^ │
│ │ (<)──── literal
│ ├── delimit ──┤
│ │ (≥)─┬── encode
│ │ │
│ │ └── escape
│ │
│ └── length prefix ─┐
│ │
└──────────────────────┘
HTTP/1.1 200 OK␍␊
Content-Type: text/html; charset=UTF-8␍␊
Content-Encoding: UTF-8␍␊
Content-Length: 39␍␊
␍␊
<html><body>Hello, world!</body></html>
──┬──
│
└────┬──
│
│ ┌─────
├────┤
│ └──┬──
│ │
│ └──
└──
Pattern ↔ Search
General Physics I — Dr. Wiesenfeld
Derivative ≪ Integral ≪ Differential Equations
George Pólya
George Pólya
Pattern ↔ Search ↔ ?
Pattern ↔ Search ↔ Stuck
scientific method
— Robert Pirsig
Novices get stuck
Corollary:
Fred Brooks
Fred Brooks
(but not always the first!)
— George Pólya, How to Solve It
— George Pólya, How to Solve It
Pattern ↔ Search ↔ Stuck
Pattern ↔ Search ↔ Stuck