Things I Learned While Teaching My Middle School Niece/Nephew to Code

I taught my niece/nephew (8th grade) some Python over the school break. Here are my takeaways as a developer.

1. Starting with syntax bores them

  • Going through print, variables, and for loops in that order made them lose interest within three days
  • But when I had them build a game first, they finally got hooked

2. Half the battle is typos

  • Missing colons, getting indentation wrong
  • The most important thing was building the habit of reading error messages

3. It's better to let them use AI

  • At first I stopped them because they were asking it for every answer, but I told them to just use it
  • Instead, I asked them every time, 'Explain why you wrote this code this way'

The conclusion: teaching the attitude of 'if it doesn't work, try again' was harder than teaching coding skills.

by 디지털노마드29

9 answers

Agreed, especially #1. If you start with grammar, people bail right away lol

by 데이터덕후752 · ▲0

Making them start with game development—is that what everyone does these days? I don't know, that's a bit... For an 8th grader, wouldn't it be better to give them some fundamentals so they don't get lost later? I agree there's no point if they lose interest, but completely flipping the order seems like a different matter.

by 월급루팡399 · ▲0

I tried something similar with my niece/nephew (a 7th grader) last year, and when I had them draw a star with turtle graphics, they actually enjoyed that. But the real problem came three days later. They said they didn't know what to make... In the end, letting them set the goal made things a bit better. By the way, the habit of reading error messages is really important. I deliberately planted an error and had them find it.

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

Got a source? lol

by 초보개발자899 · ▲0

I really agree with #2. Everyone loses it at least once over colons and indentation. But I think it's better to set up the editor first than to fix that for them. Just having auto-indentation and error underlines solves half the problem.

by 뉴비탈출732 · ▲0

I'm kind of against letting them use AI. If they use AI without even the basics, they'll easily turn into just a copy-paste machine. They say they asked, 'Explain why you wrote it this way,' but I doubt an 8th grader could really explain it properly. Wouldn't it be better to give them more time to struggle through it on their own?

by 코딩하는곰714 · ▲0

The conclusion really resonates with me. I've taught adults too, and the attitude of giving it another try when it doesn't work—that's something you truly can't teach. Skills will catch up later, but if attitude isn't instilled when they're young, it stays that way.

by 프롬프트장인460 · ▲0

Same here. The hardest part is breaking the habit of immediately asking when something doesn't work.

by 뉴비탈출260 · ▲0

Honestly, I wonder if my niece/nephew actually wanted to do it. If their parents made them do it and they were just forced to sit there, nothing is going to stick no matter what you do. That was the case in our house too... so we ended up giving up after a few weeks lol

by 취준생김씨318 · ▲0