Ask HN: Best resources for teaching my 8 year old to code
Looking for feedback for resources and ideas on how to ease my son into coding. He loves Minecraft and has done hour of code. Now he's excited to build his own website. Any kid friendly options out there that cater to this?
I was thinking of setting up a Node server with hot reload so he can make changes and instantly see them while we go over some of the basics of HTML as a starting point, create a few pages and link them to each other. Having an immediate feedback loop will be important.
22 comments
[ 2.8 ms ] story [ 63.8 ms ] threadDevelop locally save, refresh the browser to view (Checkout Laravel Valet for local web server on OSX).
After that walk through registering a domain and basic hosting, uploading via FTP. Just so he knows how it works.
After that move over to storing things in a repo and deploying.
Then reveal the magic and better practices.
Next learn to roll their own web app with authentication, etc.
Then show them a framework that takes care of the 'magic' behind the scenes.
Another good project, if you plan to go from html to coding, is https://microbit.org
I'd suggest going the opposite way: start off with vanilla local HTML files. At the very start, he's going to have his hands full with HTML and CSS, then eventually JS and dev tools. It will make way more sense for him down the road if you introduce templating/routing after he realizes the tediousness of copying and pasting layout changes across multiple HTML files.
For introducing server-side things, I'd suggest something web-centric like PHP. It may not be sexy, but it does two important things: 1) it won't bog him down as much as Node with configuration/plumbing stuff like setting up a database or adding static asset middleware, and 2) it will expand your son's horizon from just-javascript-development to polyglot development.
I was at a steam fair last weekend, and they had the OhBot, a programmable robot face, on display. It is programmed with what appeared to be a version of Scratch. You could control the head, mouth, and eyes with the track pad and keys. Kids were really into that and there was quite a line at that table.
Thinkfun also has a good board game to teach programming logic called Code Master Programming Logic Game.
If you really do want to go a more abstract route, I would start with the Python for Kids book by Jason Briggs. Once he gets through that, get the Python Crash Course next and work through the 3 problems in that book. It has one where you make a Django app with a user login.
I have tried to teach my kids "programming" but it isn't until they are invested for their own reasons that they really care to learn this stuff. We let my oldest just look around at projects on scratch so he could find things HE was interested in (minecraft, gravity falls, etc) and then he was interested enough to start copying and manipulating projects (we didn't even show him how to do it, he just figured it out). Now he has posted his own first project and had the unique feeling of "shipping" something. I think that "shipping" feeling is the quick feedback kids need to get and stay engaged.
- Coding for beginners using Scratch (Usborne)
- Code Your Own Games!: 20 Games to Create with Scratch by Max Wainewright
- Super Scratch Programming Adventure! by The LEAD Project
- Coding Projects in Scratch by Jon Woodcock
- Scratch Programming Playground by Al Sweigart
The list above is roughly in order of difficulty. The first two books have spiral binding so they sit flat on the table. I found this to be immensely helpful when my kids first started to use the computer / do Scratch. They could focus on using the mouse and tap-tap-tap typing on the keyboard without losing the page.
(edited for formatting)
No need to learn javascript or something else at this point. if it's not immediately related to what he wants to do he'll get bored.
You have the right idea with feedback loop. Kids can teach themselves, given the resources. Your main job is to nurture his motivation.
Source: I taught music lessons to ages 7+, for over a decade.
This provides a drag and drop interface for loops and variables and makes LEDs blink nicely.
Also makes it super easy to switch to the js or python representation of the visual program.
Tried it with a 7 year old. She got it I think.
See here how easy it is to get started and actually do stuff with minimal effort: https://mojolicious.org
If you want to teach simple website creation with real code, then just use CodePen. By default, you get 4 tabs for HTML, CSS, JavaScript and preview. Absolute no need to introduce a server.
Install it ask him to type:
I also have an Construct2 license liying around to teach my nephew how to code with Games!!. Take a look at it: scirra.com/construct2
https://www.youthdigital.com/courses.html#codingcourses
Also, my daughters started playing with Alice3D objects at a very early stage and I was in charge of scripting the objects. At 8-9 year old they can script the objects by themselves.
Another toy is the Lego Mindstorms where you can build the robot (I think it is complicate for young kids) and they can script the action in the iOS app.