The Six-Line Challenge 😂
2026.08.20.
Enning had finished her homework.
The Chinese chessboard stars were working. The for loops were working. The code was becoming increasingly professional.
Donald noticed eight lines:
for(let i = 0; i < 2; i++) {
drawStar(6*i+1, 7);
drawStar(-6*i+7, 2);
}
for(let i = 0; i < 2; i++) {
leftHalfStar(0, 3*i+3);
rightHalfStar(8, 3*i+3);
}
They worked perfectly.
But Donald saw an opportunity.
“How can we simplify these simple 8 lines of code?”
Enning didn't see it.
She asked:
“直接写上去对吧?”
“其他 delete?”
Donald didn't give her the answer.
Instead:
“I can simplify those 8 lines to 6 lines. Can you?”
Finally, Enning accepted the challenge:
“okl will try”
Donald:
“Nice. Try. Why not? 😀”
The waiting lasted only a few minutes.
At 13:32, Enning came back with:
for(let i = 0; i < 3; i++) {
drawStar(2*i+2, 3);
drawStar(2*i+2, 6);
}
for(let i = 0; i < 2; i++) {
drawStar(6*i+1, 7);
drawStar(-6*i+7, 2);
leftHalfStar(0, 3*i+3);
rightHalfStar(8, 3*i+3);
}
And asked:
“is this?”
It wasn't the final answer.
But it was a very good answer.
Enning had found a way to reorganize the code herself.
She had moved from not seeing the possibility to constructing a new possibility and asking for verification.
Donald replied:
“Great. We need just one for loop, not two. 🌟💪”
The six-line challenge had unexpectedly become a one-loop challenge.
And now the interesting part begins.
Because the question is no longer:
“Can Enning write a for loop?”
She already can.
The question is:
Can she see that two loops with different jobs may still share one deeper structure?
This is what makes programming so much fun.
The code already works.
Nobody needs to change it.
Yet we can still ask:
Can it be simpler?
And when the learner doesn't immediately know, the answer isn't:
“You can't do it.”
It's:
“Try. Why not?”
Enning's first attempt wasn't the final solution.
That's fine.
The important movement was:
I don't see it → I'll try → Is this?
That is the habit we want.
The final six-line—or perhaps even more elegant—solution is almost secondary.
The learner has started looking for structure inside code that already works.