from Hacker News

Ask HN: How to teach my children programming

by GBiT on 2/24/23, 6:24 PM with 4 comments

I have 6, 8, 9 years old children. Can you please share your experience of how you teach your kids programming? What services or software do you use?
  • by fl0ps on 2/24/23, 7:07 PM

    Let them play NES, classic games like Super Mario World. Then show them the same games on the emulator FCEUX, specifically the hex editor (for glitching the game by plonking numbers at random addresses) and then the lua scripts that give them super powers by purposefully putting values where they do specific jobs.

    Same with Minecraft: Use a Pi, search for Minecraft Pi Reborn (just so it's not a crap experience like the original abandonware Pi Minecraft has become). Then show them https://projects.raspberrypi.org/en/projects/getting-started... or any of the other pi+python+minecraft projects. Use Python to check the Minecraft players location and upon sensing it's at a specific location on a particular map, move the player somewhere else. They've just created a Teleportal (randomize the destination for added mischief).

    Then for bonus points use this: https://learn.sparkfun.com/tutorials/python-programming-tuto... to tie conditions inside the Minecraft game with real world buttons and lights. Wire up a button to GPIO pins that the python code checks to trigger summoning a 5x5x5 block of TNT upon command, or an LED that lights up upon some other in-game condition. There's a lot of material there, and if you're on several Pis you can network them together safely so that all three can play together on the same server without needing access to the internet. Clobbering siblings with Minecraft Python magery is a great motivator. They'll never even notice they're learning stuff even adult devs may not know.

  • by helph67 on 2/24/23, 9:32 PM

    "Turtle Academy makes it surprisingly easy to start creating amazing shapes using the LOGO language" https://www.turtleacademy.com/ I'm not connected with Turtle Academy in any way.
  • by surprisetalk on 2/24/23, 7:59 PM

    I recommend helping them build stuff with elm playgrounds:

    [1] https://elm-lang.org/examples

  • by dstala on 2/26/23, 2:49 PM

    Teach them how to use prompts instead. By the time they grow up, it'll be GPT/AI all over