What Surprised Me When I Taught My Middle School Nephew to Code

Since it was vacation, I tutored him for about a month. At first I thought I needed to start with Python syntax, but that was my mistake.

When I taught him syntax, he was uninterested, but when I suggested building a calculator related to a game he liked, he suddenly became totally engrossed. He understood if statements in a day. It took me 20 years of living to really feel that motivation comes before syntax.

The only thing I regret is that I barely trained him to find errors on his own when looking at broken code. Next time, I plan to intentionally plant bugs and have him find them.

If anyone here has taught kids, please share some tips.

by 월급루팡541

8 answers

Agreed. Motivation is everything. Learning grammar later, when you actually need it, is way faster.

by 클라우드러버429 · ▲0

Oh, I didn't know that.

by AI덕후710 · ▲0

Since debugging practice came up: planting errors on purpose is good, but before that, try having them read the error message out loud. Beginners just see red text, get intimidated, and don’t actually read it. With my kid, once that became a habit, their speed at finding issues on their own went way up.

by AI덕후152 · ▲0

But isn't it a bit of a stretch to generalize from this? It only worked because he happened to be a kid who likes games—he got lucky. For a kid whose interests lie elsewhere, that approach won't work as-is. "Motivation before grammar" is true, but it's such an obvious conclusion that it doesn't seem very helpful as a tip. The hard part is sparking the motivation; everyone knows it should come first.

by 문과출신개발자311 · ▲0

Got a source?

by 코딩하는곰533 · ▲0

Feeling it after 20 years of living lol I'm on my 30th year of feeling it. If you realize it even late, that's all that matters.

by 월급루팡667 · ▲0

I've done something similar with my nephew: if they like building calculators, throw out "let's make it save the score history" as the next step, and it naturally leads into file I/O. If you start with grammar, they get really uninterested. I can relate.

by 무한도전러452 · ▲0

I don't know much about teaching kids, but the habit of reviewing your own code is really important. If you have them start not with "if it runs, that's it" but with "let's add a comment to each line explaining why it works," it makes a huge difference in how much energy you have when tracking down bugs later.

by 스타트업러866 · ▲0