Ask HN: How are you teaching your children programming?

67 points by tchaffee ↗ HN
What websites, apps, tools, videos have you decided on to teach your children programming? Are you using only online resources, or also traditional classroom setting? What do you like about the apps and tools you are using, and what could be improved?

65 comments

[ 4.9 ms ] story [ 18.6 ms ] thread
I would not. Kids should be outside playing and interacting with other kids, not coding.
Why are those two things mutually exclusive?
Coding outside while running around sounds like a bad idea. But if you meant non-concurrently, then I agree: kids have lots of time, especially if you don't allow them very much screen (TV, play computer) time.
I learned php on a handspring visor with the manual downloaded into a offline browser app while on the playground. Couldn't even run my code until I got home and hotsynced it!
Coding, in my experience, tends to consume a lot of time especially for a kid who is getting into it. I think many of us here can recall the long hours or even all-night coding sessions we did when we were young, learning, and everything about programming was new, exciting, and frustrating at the same time.

When I was young (12-15) I spent a lot of time programming and very little interacting with other people outside of school hours.

The same thing can happen with video games or even reading of course.

They aren't asking for parenting advice here. Kids need more than just playing outside, hence the whole school thing.
I like how you went right ahead and contradicted your advice - kids don't need school either, lots of kids thrive on "education otherwise" (a UK expression covering unschool, homeschool, home ed, etc.).
All versions of learning, not just playing outside. Didn't think this was very hard to understand. Then again I went to school...
The substantive point was that you said they didn't need parenting advice and then gave parenting advice in the next sentence.

Adding an implied ad hominem remark doesn't alter the fact you immediately contradicted your own advice.

If you meant "structured education of some form" and instead specified "school" I don't really see it's obvious the generality was intended.

Indeed the likelihood arises now -- given your implicit suggestion that people who don't attend formal schooling are somehow deficient -- that in fact you only considered school when you made your initial remark.

I think you read too much into it. He was just countering nether's remark. To do that he gave an example.
While I agree, you don't want to stifle your kids childhood; these are not mutually exclusive.

You teach your kids how to read, how to do math, history of the world - Computer science will soon be no different. Might as well get ahead and teach them during learning time.

> Computer science will soon be no different

What makes you think that? It's a very specialized field. It's not going to be something parents are casually teaching to their kids.

Typing class has been replaced by computer classes. I think it's an eventual reality, albeit a slow process.
By cultivating interest, not by forcing them into it.
And how to do that ?
By seeing all the fat stacks that mommy or daddy is bringing home?
Ew, on several orthogonal levels.
Could you expand on your reaction a bit?

Seems like encouraging children to follow an interest that could lead them to wealth through work isn't a bad thing?

You're encouraging a money-grubbing attitude, which is not really a healthy one to have for long-term happiness.

Furthermore, if they only see it as a path to money and not an end in itself to construct great, helpful, beautiful programs, they're gonna burn out real quick.

Also, "having money" as a goal is just somehow repulsive. Seemingly all the sleazeballs of the world are oriented like this, and as a result they tend to be very shady and use people as means to getting money rather than actually people, with whom meaningful relationships can be forged.

You have to let kids latch on to things they are interested in. The best way to do this is to expose them to as many experiences as possible. It is very likely that your kids will not latch on to the same things you did. As a parent, the best thing you can do is to let that go and focus on what your kid actually wants.
Find out what they enjoy and are good at. As cheesy as it sounds, cultivation of self interest is the best way, forcing only works for a decade or two.
>And how to do that ?

Just get excited and show enthusiasm, if you're genuinely excited about it, then it's contagious and kids pick up on that.

If a kid is really interested in learning about computers and programming they will do it. One thing that can end badly is if you try to force the subject on them. It will become like a class at school then.

I would leave them alone, let them see what you do maybe, show them minecraft. But don't expect them to magically take to it.

When I was a kid I gained my interest in computers from seeing my Grandfather building a computer, my sister was there when he was building it. Yet I kept to it and she pursued other endeavors.

This has been an interesting topic for my wife and I. Our kids have very limited screen time, and do not have access to a computer / smart phone / iPad on a regular basis.

Recently, though, my 1st grade son, the oldest, found the book "Coding Projects in Python" (https://www.dk.com/us/9781465461889-coding-projects-in-pytho...), and read through it for about a week before asking if he could use my computer to try some of the projects out. I set him up on an old linux box with no internet access, opened a text editor (gedit), and showed him how to run his scripts in the terminal.

Honestly, I thought he would loose interest after a few days. But he has stuck with it for the last few weeks, working on the projects after school with minimal help from me (I work from home). So far, he learns what he is interested in, skipping around the book to find projects he likes. He has learned a fair amount in that time, and importantly for me, is learning a bit about how the computer works at the same time. Not sure where we will go from here, but the self-directed path is working well so far.

Your son is impressive! My daughter is 3 now and I pray she follows a path like this. Obviously I will love her regardless ;)
Even if she picks the wrong editor?
Even if she mixes spaces and tabs?
children were thrown from cliffs in ancient Sparta for less
If he doesn't have internet access on that box, won't that be a problem once he needs some library from PIP or elsewhere? I'm sure right now he's just using the standard libraries, though.
I agree, the setup now won't work for too long. He is using all standard libraries now - once he needs more, we will figure it out as we go!
> He is using all standard libraries now - once he needs more, we will figure it out as we go!

Maybe you could install Anaconda (or some similar distribution), which has lots (almost 500) of popular libraries preinstalled.

I hate to sound like an fogey (because I consider myself a young fogey) but I think the most brilliant part of this is getting rid of the internet connection.

The kids these days learn everything, but they don't learn to focus.

I do it very haphazardly. I've used hour of code, apple's swift training program on the iPad, scratch, cargobot, sprite-box, the new bbc micro with some ms programming tool. But I've only spent a few minutes on each tool ocassionally. My impression is that you don't necessarily need a concerted effort. My youngest learned reading when he was 5 through a rather lazy approch from me and my wife. We just did stuff ocassionally at the spur of the moment. Some ideas seem to just need time with kids.
I'm not.

But they do occasionally come over and ask me what I'm doing. When they do, I explain.

My kid has been to a couple of camp Edmo where he does some programming for Minecraft, etc. He enjoys it, though most of his summer was outdoors stuff. I haven't looked at the actual code produced in these camps, so I couldn't tell you much more.

I actually have started doing some programming with him around his math homework, using python. This doesn't replace doing things by hand, but it's very different from just using a calculator. There's a different thought process that goes into automating a solver through code that I think is a valuable mental exercise, and that can lead to a deeper understanding that repetitive drills.

The downside to this is that it's more homework-ish, but he actually seems to enjoy learning and realizing how much busywork he can automate, and how much this can scale.

Another wrinkle here is that I wouldn't recommend becoming a software developer or programmer as a career path - however, I do think learning to program is a great idea, especially where it comes to analyzing data. Programming and math ability can become something of a super power when you can apply it in a field where most people don't have those skills (law, medicine, digital humanities, etc).

He discovered scratch.mit.edu on his own, and has been getting more sophisticated by the day. I barely have to do more than help him debug things sometimes.

I am pondering when to introduce him to more classical text-based scripting, but I will admit that nothing I can think of at the moment competes with Scratch for sheer ability to create and share games and animations easily.

My son is 12 and a half. I have recently handed him a copy of "Learn you a Haskell..." and a laptop running ghci. He has been making his way through the first couple of chapters with only a little help from me, and seems to be understanding everything that's come up so far.
Organically, like just about everything else.

Both my sons showed interest in programming at various times. We toyed with Scratch, then Visual Studio Community Edition to try textual input. Then some Python through Khan Academy and "Learn Python the Hard Way." Enthusiasm for it came and went and sometimes came back just like most things kids do.

One son went on to be a fairly competent programmer, using Mathematica in pursuit of his engineering degree. The other still dabbles in it from time to time, but likes other technical subjects more.

The important point is they really don't need a lot of programming when they're young, just like they don't need a lot of any specific technical field. They just need to know it exists and maybe pique their interest.

I kinda want to teach her the same way I learned, by giving her an old 1979 BASIC programming book at 7, and setting her up with an interpreter. Although, it would be so much easier to learn with the internet....
I tend to give my kids (3 and 5) verbal logic puzzles to get their conditional down. Something along the lines of "A cat has a tail and four legs and a dog has a tail and four legs, so a cat must be a dog". It normally ends with them pointing out why they are different... Just as an example but there are all kinds of everyday occurrences that can be used to initiate a logic puzzle.
When my children were young I wrote them some games using Love2d in which they and their pets were the characters.

It was just intended to be a bit of fun, and it was, but they were actively involved in the game design and the artwork. I also worked through some of the maths and physics with them and they saw how it all came together in the code.

I'm not sure they did any coding per se other than tweaking parameters for gerbil speed etc but I think they got an appreciation of where programming fits in and how it's part of an interconnected whole.

Subsequently they have used Scratch at junior school and they all took to it without any help from me.

None of them have shown a particularly strong interest in pursuing computing either academically or as a profession and I haven't seen any need to push it.

If your children do show an interest though, I do recommend something like Scratch or Love2d (I'm sure there are equivalents for other dynamic languages). It's easy to produce a game that's surprisingly good and the feedback loop is essentially instantaneous.

I particularly liked how, with a game, it naturally brings together art, maths, science, computers and programming without feeling forced.

I heard that many kids learn some programming to mod Minecraft. So if you want your children learn programming, find a motivation and do not force it.
I got my 5yo a Lego EV3 robot for his latest birthday. There's a good combination of building a real thing and then messing about with the visual program editor to make it move, shoot, turn, etc.

Seems to have figured out basics like how to change the number of repeats.

I change his diaper, hug him, and tell him I look forward to him crawling.

But seriously, I'm probably not going to Teach Programming; it'll be be one of the Things Your Dad Does, and he's welcome to be interested; I'll push him to understand the computer as a building block and change agent of society, but programming, meh.

If he really wants to fart with a tablet, I'll redirect him to a rasppi - to be a cocreator, not just a consumer.

The best site I'v seen for kids. Is a site I ran across by accident on reddit. http://silentteacher.toxicode.fr/ The simplicity and slow progression of it is really great for kids. My daughter is 7 and she loved it.
Man if I had focused on programming instead of gaming I would do myself such a favor. Even though Im a dev I find it hard to do get much better nowdays, finding time etc.
My now 13 year old son first started at age 9 through Minecraft hacking away at mods. More recently he moved into creating JavaScript games and creating Raspberry Pi projects with Python. Our latest project is a retro arcade system built with the Pi.

So games and fun projects that we work on together. Also don't try and overly force coding standards at this young age. Let them hack away and have fun.

Currently, in the worst possible way, Roblox. I hate everything about their business model but the environment is perfect for encouraging programming. For starters, developers/hackers are often represented as heroes. Kids know who they are because they're the subject of in-game lore and YouTubers talk about them a lot. Second, Roblox Studio is a mostly complete, easy to work with game making environment, assets are easy to obtain and scripting is in Lua. Most importantly, kids can show off their work immediately to all of their friends in a multi-player world.

The bad parts of Roblox provide an opportunity for me to explain exactly what's bad about proprietary tools, centralization, pay-to-win, spending real money on digital goods, etc. Roblox isn't much worse than AAA games in this regard. My kid is showing forethought about spending his limited supply of Robux and he's parroting some of my rants when he talks himself out of buying something. Hopefully that parroting turns into genuine understanding. Eventually, he'll want to move on from Roblox or they'll disappear and he'll learn first-hand the pain of moving to a new platform and leaving all of your code and digital goods behind; and that the only things that last are libre code/assets, algorithms, concepts, ideas and memories.

I actually picked up this Code & Go Robot mouse activity set from a local Micro Center this past weekend.

Its ages 5+, but a 4 year old can do it. you can command the mouse to go forward, backward, turn right, and turn left. You build your own maze out of the pieces. There are little cards with the action that they can place on the maze to help plan out the steps.

I think this is a great option. Previously I had recommended the board game robot turtles, but I think this is more appealing to a child.

First get them hooked on minecraft. They'll use youtube to learn about mods and plugins. And a few years later they're downloading Eclipse and starting to code their own plugins again using youtube to learn how.

True story.

We're teaching our kids programming by having them on FIRST teams. The youngest is on his second year FIRST LEGO League team, and the oldest is on a FIRST Tech Challenge team. http://ev3lessons.com is a great resource for introducing robot concepts using the LEGO Mindstorms EV3, which uses a block programming interface derived from LabView.
Very hard to teach. How are you guys doing it? I'm trying unix bash shell scripting which I picked up at the age of 29 pretty easily and felt like I could do useful things repeatably in 4 months?

My programming origin was trs-80 and basic, and for the last 20 years C, TCL, python and csh|bash|awk|sed.