10 Fingers, 8 Gaps
For years, Enning had a wonderfully consistent way of counting gaps.
“Use your fingers. How many gaps?”
“8!” she once answered loudly.
“One hand!”
“4!”
The joke was that she had apparently counted two hands, four gaps each.
But the mistake was more interesting than the joke. She was naturally separating objects into groups before looking at the relationships between them.
Today, the same habit appeared again when she worked on her Gomoku board.
I asked her to make the board size flexible.
Suddenly, the code's 15s and 14s could no longer hide from her.
Fifteen lines produce fourteen gaps. But when she changed one number, lines became too long, the grid stopped being centered, and other calculations broke.
She tried, fixed, tried again—and quickly discovered that the numbers were not independent.
Eventually, she arrived at a much cleaner algorithm:
let boardSize: Int = 15
let side: CGFloat = 43
let gridX = (rect.width - (CGFloat(boardSize) - 1) * side) / 2
let gridY = (rect.height - (CGFloat(boardSize) - 1) * side) / 2
Now boardSize described the board, and boardSize - 1 described the gaps between its lines.
The same idea controlled both the horizontal and vertical dimensions.
The funny finger problem had quietly become a programming lesson.
Sometimes the hardest part of a problem is not calculation or syntax.
It is choosing the right mental model.
Enning's “10 fingers → 8 gaps” shortcut was funny, but it also showed how a small structural misunderstanding can create endless edge cases.
The Gomoku board gave her nowhere to hide.
15 points. 14 gaps. One continuous structure.
And for homework, I asked her to rewrite the program from scratch—not to remember the code, but to remember the algorithm.
She could even do it on paper first.