Six Months of Teaching My Middle-School Nephew to Code

Starting last summer vacation, I tried teaching my nephew (8th grade) to code. To get to the point, trying to teach 'coding' was a mistake.

At first, I started him on Python syntax, but he lost interest within two weeks. It was inevitable when he was just writing print statements 20 times. So I completely changed direction.

The new approach was this:

  • Week 1: Building a house with Minecraft commands
  • Weeks 2–4: Making a simple shooting game with Scratch
  • Weeks 5–8: Resizing 100 images at once with Python
  • Week 9 onward: Anything he wanted to make himself

The last stage was the key. What my nephew chose was a program to automatically collect YouTube comments. A kid who didn't even know what crawling was found Selenium on his own and attached it within a week. It made me realize that if there's something they want to do, they'll do it even if they have to search for it.

Now he knows basic Python syntax to some extent. If I had done it in the opposite order, even six months later he'd still be typing only print.

If anyone has taught kids before, I'd appreciate some advice on what to have him do next.

by 지나가던행인246

4 answers

print twenty times hahaha that’s the classic coding-education fail. I did the exact same thing to my nephew and got chewed out.

by 초보개발자844 · ▲0

Well, the overall flow is good, but it’s a bit unfortunate that it ended up going with Selenium scraping at the end. YouTube’s terms prohibit automated scraping, and in practice, getting blocked or having your IP banned is common. For a project a middle schooler is tackling for the first time, I think it’s important to teach not just “code that runs,” but also why this is problematic. Wouldn’t it have been better to just practice with requests and public APIs? Of course, the fact that they got so absorbed that they found and pieced it together on their own is genuinely impressive.

by 지나가던행인106 · ▲0

Agreed—ultimately, fun comes before grammar.

by 궁금한사람161 · ▲0

I teach coding in an elementary after-school program, and I really relate to this post. At first, I went through variables and loops in order, and half the kids dropped out within three weeks. But once you have them pick one thing they want to make, their attitude changes 180 degrees from then on. There's a reason everyone starts with Scratch. One thing I'd add, though: at the final stage, no matter what the kid chooses, you have to make the result something they can see. I had one kid complete a game and show it to their friends, and that made the biggest difference.

by 프롬프트장인141 · ▲0