~ $ cd craft/guess-the-rule && cat README.md
Guess
the rule.
There is a rule that you have to guess, and it changes every time you reload this page. Propose sequences of three numbers, test whether they satisfy the rule or not, and guess which rule it is.
Sequence numbers and their result:
| a, | b, | c | |
|---|---|---|---|
| 2, | 4, | 8 | ✅ |
The rule is drawn, and the guessing played, when the page runs.
It is the puzzle of A quick puzzle to understand testing and refactor. 2, 4, 8 passes whatever the rule is, so it says nothing about which one it is: what tells the rules apart are the sequences that fail. The puzzle leaves, in my words there, "a lasting memory of the necessity of having failing cases, indispensable to understand TDD". And the rule you found is not the only one that passes every case you tried — finding another that suits better, with every case still passing, is what a refactor is.