Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Best way to introduce programming to a 5 year old?
44 points by bufferoverflow on Aug 7, 2018 | hide | past | favorite | 62 comments
I'm trying to figure out the best way to start programming with a 5 year old. I guess it would be nice to have some visual language and output.


I'm not convinced that teaching kids how to code is a good idea, perhaps someone in hn could shed some light on how learning to code at a young age is a good thing. For me, important values to instill in a kid that will be conductive to their success as well as well-being are communication and empathy. The best way to achieve these is through diverse activities that involves teamwork and exploration. Rather than teaching kids how to code, sending them to be part of a sports team, band, and art group would be better choices. With these experiences interacting with people from different activities, the kid would grow up with more life experience and relate to others better, which translates to building more impactful products later on in life if they decide to pick up programming.


Furthermore, if your kid is an introvert that wants the easy escape of doing things alone on the computer, then force them to do things with other kids anyway. I wish my parents had done that with me. The existence of great programmers before the rise of home computers is proof that programming can wait for later. Some things are not so easily learned later.


I'm voting up all the https://scratch.mit.edu suggestions. I was active in that community and with the developers early on. I wish I had it when I was little.

You can browse projects with the 5 year old then view the source and figure out how they work. Show that they can change things.

It's awesome that you want to promote creation over just consuming content like most of their peers.

Scratch your own itch with it too. Make a 3d renderer or CRUD app, fractal explorer, or game... they might like to see what can be made and what excites you.

They may get into the story and animation projects made by other kids first, that's good too.


This is adapted from a post I saw on HN years ago. Can't find a reference ATM, but the gist is:

Use a simple goal oriented task - picking up a ball from one end of the room and depositing it at the other end, navigating some obstacles (coffee table etc). You are the "robot" they are programming.

Provide a partial "instruction set" left, right, forward (1-step).

Let the child figure the algorithm to pick the object, navigate the obstacles and discover the rest of the instruction-set.

They string together a program as a string of post-it notes.

The only rules are the "robot" always runs the program from the beginning - no hot-patching. If the instructions bump you into a table, you stop. The child goes fixes the program, and you start over. Great for debugging skills and building abstractions in the head.

Incredible, how quickly they discover loops and functions. And very quickly learn to create program in the abstract for other tasks (unloading a dish-washer).

I never went as far as sorting lego bricks, but that might be another interesting direction to explore to introduce algorithms.


A simpler version of this when they're pre-literate is to put them on your shoulders and be the robot, but only listen to certain commands. I played this with my 4 (now 5) year old daughter and only responded to "turn," (I only turned left) "forward," and "stop."

Needless to say, she enjoyed spinning me in circles and running me into things. Eventually she learned how to actually navigate around the house.


10 wait

20 if age < 7 then goto 10

I think you can introduce programming concepts into play, but I would leave (and have done) actual programming until they are a bit older.

There was a good example possibly linked on here a few days ago, where with a group of kids, one of them pretends to be a robot (they can take turns), and the others "program" the robot with simple commands (forward, turn left, pick up, etc, etc). It can be step-by-step to start with, and then they have to write down the steps in advance, etc, etc.


Disagree. I started programming when I was less than 4. My Dad had an Atari, and I would sit and copy the code from some books. I didn't know what I was doing, all I knew is that I wanted to play the game, since I saw my Dad do it.

He didn't force me at all, I just wanted to. So I would modify your pseudocode and add a branch for the kid's interest/aptitude.


Sorry, you were definitely not programming at 3 years old.

> I didn't know what I was doing

At most you were developing fine motor skills. Maybe.


I think you weren't really programming in that case, but I agree if the kids shows an interest it's worth steering them toward more advanced activities.

On the other hand I think at this age it's much more important to be playing physically and socially, than to be buried in a screen.


This. Programming involves developing comprehension for the ability to strictly follow rules. Kids should not be exposed to this too early. You want kids to be as unbound as possible at early age.


I agree with this. The main question for me, is: programming in place of what?

Free play which involves the whole body and develops balance, motor skills etc.?

What is the brain development cost of replacing this with a frozen position in trance-like state in front of a screen?

Instead of socializing, or in any way interacting with human beings, picking up empathy, humor, refining public speaking, leadership, communication skills? Because these are the skills that lend VC capital, C suite jobs and fat exit checks.

Lastly, after working with a few high quality offshore teams, the future market for programmers is very likely in China, Russia, Ukraine etc. and the pay will sooner or later equalize.


When I was a kid, my father bribed and coerced me into playing with LOGO (really showing my age here). I ended up spending a fair amount of time playing with it, (I guess) learning a lot of basic programming concepts along the way. I have memories of my grade-school self struggling to grok recursion.

There were a few aspects of LOGO that made it nice to learn on: most notable was immediate visual feedback and the "telling the turtle what to do" approach to imperative thinking.

When my wife was pregnant, I was overcome with nostalgia about LOGO and hacked together an in-browser collaborative playground (http://turtology.herokuapp.com), which seems like a total dead end at this point. LOGO was genius in it's time, but it seems terribly dated now, even to my fanboy eyes.

Apart from Scratch (which has a bunch of mentions already), the nicest thing I've seen is Cubetto: https://www.primotoys.com The combination of rapid feedback, simple interface and a real-world "avatar" for your instructions seem to make it really easy to figure out, as well as engaging. Also, now that I have a toddler, I can also appreciate the genius of the simple, physical interface. My 2-year old is still a long way from reading or writing, but is quite capable of recognising that a symbol can represent an action or concept.

Now I just need to figure out how to get one shipped to me (not trivial if you live in Africa).


My mother introduced me to LOGO at age 8. She was a teacher but could barely program herself. Pretty soon I was teaching myself from books.


Pick an easy language like python, then teach him in order:

    print, print, print
    print, input, print
    print, input, if print, else print
    print, input, for print
    func, print func
These are the basic building blocks of all computer programs in the universe, if he can master them and gets his curiosity in overdrive then he'll be a great programmer, a good skill to have even if he picks another career path.


If there is a toy or app that has programming related activity in it, and they enjoy that app, then they will learn. Not only that, they'll learn faster and more independently than you can imagine. But in my experience it has to be something they really enjoy, it's hard to steer them.

As others have said, I think 5 is probably a bit early. It varies of course, but programming is so much easier when mathematics, words etc is a bit more natural. 6 or 7 is probably easier for most kids.

What I did was (this was an idea from a previous HN discussion I can't find) was sneak programming concepts into the little "riddles" kids want all the time when they are learning. "Dad ask me how to spell a word" or "Dad ask me to add some numbers" etc.

What I did was tell stories about "machines" that could take in something and output something. I say "ok, I'm thinking of a machine. It takes in a word, and outputs a number. Guess what it does.". The child can give example inputs, and I say what the machine outputs. They say "Cow" I answer "3". Very quickly they manage do deduce what the machines can do. A machine that doubles. A machine that adds 3. A machine that always returns 9. A machine that reverses strings. A machine that returns 1 if a word is longer than 4 letters otherwise 0. The "machines" are obviously "functions". And it's absolutely astonishing how quickly this concept sinks in. Even more fantastic is that more complex functional complex can be introduced just as easily. The idea of chaining two machines together (feeding the output of one to the input of another) gives composition. The idea of a machine that reverses what another machine did (inverse) etc.


Start not with code, but with computational thought. Show them the basic of algorithms - not complex algorithms, just simple things - break down a goal into a specific list of ordered steps. Teach them loops, if/else, and such basic concepts.

You don't even need a computer for this. Many classrooms start with offline exercises, with the kids giving instructions to other people. Have them tell their friends step-by-step how to walk around an obstacle course, etc. That also will introduce them to debugging, as they will see right away how an inaccurate or incorrect instruction can go wrong, and they can correct it. When they are comfortable with all that, then you can step into talks of how you would structure such instructions for a computer, or as you said, use a visual tool for the same thing.

But stay generic - the concepts are far more important than any details at this point.


I've been trying to teach my 5 year old with a custom language/app I built a while ago:

http://modelian.com/

Basically, it's a programming language to make very basic 2d physics simulations.

It's actually gone really well, she loves changing the size and colors of the shapes. She's learned how to type (keys, capitals, arrows, backspace, etc...) and how to manipulate a lot of things.

I wouldn't say she is really "programming" yet; it's more of "I know this number changes the size of the block and this other thing changes the color". Anyways it's a great start and we have a lot of fun on it together.

(Note I built this a a while ago on Parse which has since shutdown so the saving/account functionality doesn't work any more. You need to copy your scripts to a text file to save.)


I've heard that Scratch is a good language for children. https://scratch.mit.edu/


I'm considering the same with my kids but not done it yet yet. Scratch seems like a pretty good start. If they prefer seeing something more physical rather than an animated cat, the BBC Microbit can be programmed to do blinkenlights in the same way.


The LEGO boost robot kit also uses the scratch language if you want something physical and your kid is big on LEGO’s.

In addition to scratch, there are a few games like “LEGO fix the factory”, “lightbot jr”, and even “human resource machine” (my five year old can only handle the first few levels though).

The dragon box apps are also fun if you want to give your kid exposure to algebra and geometry concepts.

For pre-5, the new Kahn app looks nice. (Our kid already knew the material by the time it came out, but still has fun with it.)


Lego Boost or WeDo is on the shortlist for an upcoming birthday present.

Boost looks more "fun" but fairly single-purpose. e.g. Some of the command are specific to one model. It seems a bit like the more modern Lego sets where pieces are complex. Cooler models but less flexibility.

WeDo is intended for schools and looks better in that there are simpler block and a more free-form goal to it. It reminds me more of the sets we probably had when we were kids - i.e. just bricks and your imagination.


Out of the box the Boost runs you through the base models with some build-specific commands. We've been through most of those builds. They also have some bases for building your own creations, and they have completely free-form programming. (Scroll to the right and tap on the swirly looking thing in a window - it's not particularly discoverable, but kids are surprisingly good at exploring all the corners of UIs.) They've also added some builds that combine other modern lego sets with boost.

I wasn't aware of WeDo, or I would have taken a look at it. I was looking for something to motorize legos and to expose my five year old to programming (if he was interested) and mindstorms seemed too complex/expensive.

It looks like boost may have more motors than WeDo (and the motors can be used as rotation sensors), 800 lego parts, some pre-designed builds (he's enjoyed the robot, cat, and truck thing). However, the "control hub" is a bit bigger on Boost (it contains two of the motors), which effects the size of things you build with it. I probably would have still chosen Boost if I'd known about WeDo.


I was 7 when my teacher introduced the Logo programming language.

We used an educational adventure game called "Crystal Rain Forest", which had a series of puzzles introducing gradually more complicated programming concepts.

Here[1] is a mid-way-through puzzle, using Logo-like[2] commands, at first interactively, then by making a simple script. The next puzzle [3] adds a "Repeat" loop.

After the game was completed, we could use the floor turtle to trace out our completed crystals [4].

I guess this [5] is the updated version.

[1] https://youtu.be/p_DV1DGX150?t=1815

[2] https://en.wikipedia.org/wiki/Logo_(programming_language)

[3] https://youtu.be/p_DV1DGX150?t=2399

[4] https://www.youtube.com/watch?v=dy4jgTo7rfs (contains noisy children!)

[5] https://www.youtube.com/watch?v=MHCkQC9orG0


I agree with the general sentiment of delaying teaching programming to young kids: what you can teach in one year to a 5 year old can be learnt in less than a week by a ~9 year old.

That said, Scratch Jr. Is interesting to connect art/story telling/scripting. Another one is Alice 3D (with adult help). For example, I played with my kids in Alice 3D where they put the characters and I, mainly, script the story including audio.


I started my daughter when she was 4. I would recommend something the child can touch over abstractions. The Learning Resources Code & Go Robot Mouse Activity Set is what I started with. You setup a different maze and place the cheese on the maze. The child will program the mouse to navigate the maze using simple arrows on the top of the mouse.

I have used other toys like the game Thinkfun Rush Hour Jr get them to start thinking about how to solve problems.

If you must start with a screen, I would recommend Scratch Jr. There is a small book that has lessons building up to a project that you can use. My daughter picked up Scratch Jr after using it for about 10 minutes.

The Microsoft store in the mall had a free course for 6-8 year olds, but it is not as interesting. I think Scratch Jr is better.

I recently tried a pair exercise building a game with her using Scratch 2.0, but I think it is still too early.


I am in the same boat as you, though my kids are a slightly older. Other replies here are more informative than mine, but here are a few more pointers.

NOTE: My kids have been doing hour of code, scratch on and off and they love it: http://partners.disney.com/hour-of-code. Sometimes kids do want to know "how does it actually work".

I have noticed that we digress quite a bit.

Here are some observations:

  1. Children learn a lot better when they are in a group (of say 4), especially with slightly older kids.

  2. Make them write down what they understood after the class.

  3. I started with the simplest computer in the whole world 
 (in my opinion, not a turing machine) i.e 
    cpu <---> memory model. Again, I am not an expert but thought this level of abstraction was easily digestible for them.

  4. Then explained that everything that they can do on the computer is all done by this basic computer, just faster.

  5. Then introduced them to the notion of basic programming.
     A. Computers understand only very very simple instructions, called machine instructions.
     B. We can slightly better using higher level languages.
     C. If a computer does not understand what you say, it cries like a baby. You need to get used to the different cries (error messages) and sometimes it can be very difficult. 
     D. Simple instructions.
     E. I had to introduce print as a function. Actually this part was not difficult at all.
     F. I am tiered of typing things again and again: loops
     G. Hey we did that before, can we use it again? functions
     H: Sometimes we need to make decisions? if / else

  6. Familiarity with the jargon takes time and is perhaps half the battle. 

  7. Our next step is to identify simple problems that are programmable.

Here is the progress so far https://saanviperi.com/


This is a bit out of left field - but I (offhandedly) showed my kid RoboHash: https://robohash.org/ which he thought was _awesome_. He could type in words and generate robots, which is kind of like a super power to a kid.

He asked me how it worked, and I used that to talk about some core programming concepts, including showing him some code. I wouldn't say he "learned" programming from that experience at all - but now he knows what code is, and sort of how programs are made, and he knows that you can make cool stuff like robots :)

So I would say: find something they are really interested in (maybe that's Minecraft, or robots, or animation, etc) - and use that as a jumping off point to introduce the concepts to them.



I had a lot of success with code.org's Hour of Code. First with my five-year-old, and then two classes of elementary school-aged children. It's extremely visual, introduces kids to actual code syntax, and lets the kids choose what theme most interests them. We went with Star Wars, but there are lots of other options.

Every kid will get it at a different pace. So don't stress it and just enjoy the one-on-one time. The most insightful advice I ever read was, "Even if they don't get it, you have still spent quality time with your kid."


I always imagine myself how I would teach graph theory to a younger audience (middle school in my mind).

It's a good intro to 'abstract' thinking, it's visual, easy to draw, and can be use to illustrate a ton of things people deal with daily (streets, relationships on real life/twitter/facebook (bidirectional graph vs non), etc)

I think it was this[0] that made me start thinking about it

[0]: http://jdh.hamkins.org/math-for-eight-year-olds/


I think the toy that first primed me for programming was a marble run construction kit. The feeling of working out where the marbles will go is very much like the one of following code through in your head.

Of course, rather than teaching me anything, it may have simply appealed to me because of a motive that was already there.

This kind of thing: https://www.amazon.co.uk/Peradix-Marble-Run-Coaster-Set/dp/B...


People have recommended games geared towards programming. That's good.

Games in general are good. Even non-games like Candyland. It's all procedural. Following directions.

Back in the day it used to be all about Logo and that industrious little turtle.

What's important is that they see the results of their efforts quickly. Positive feedback for nearly as soon as they put in their commands. Eventually, they'll begin to conceptualize and think abstractly and be able to build more complex things.


I bought a programmable mouse for my 4 year old daughter, she's now teaching my nearly 3 year old son to program it.

https://www.learningresources.com/product/learning+essential...

I only bought the mouse, you can make some mazes yourself.


It's probably worth pointing out this is more of a LOGO-esq programmable turtle rather than a "programmable gaming mouse" - I was quite confused for a moment :)


Lightbot is a fun way to introduce some very basic ideas.

http://lightbot.com/


Perhaps Scratch? https://scratch.mit.edu/



You can start with the Hour of Code, some lessons are easy to grasp for preschoolers.

There is also a nice LEGO Mindstorms game, Fix the Factory - they can learn the basic concepts, and then try to recreate them in the real world using actual Mindstorms blocks.


Any pipes connecting game -- very similar skillset to casual programming. I consider most programmers digital plumbers! It's also why games like BioShock and Deus Ex have them as mini games for hacking/programming.


Don't.

The best way is to let them expand their creativity and problem solving skills. Some decent puzzle books and toys will do.

Programming is just using some 'keyword' based programming languages to tell computer how to solve problems.

5-10 is a good age to expand the skills in so many fronts. Just don't limit your kids to learn some simple keywords/loop constructs etc.- which they can learn pretty quickly at any age later.


I will agree with this. I think the problem solving aspect is much more beneficial than actually programming. If you have great problem solving/critical thinking skill then converting those into some program is trivial.

I also think 5 is a little young... I'd be more afraid of turning a child off to the concept due to it being boring. My son is now 11 and they started doing some Scratch programming at school last year and he thinks it is pretty cool. It has also triggered some interest in him wondering what I do at work especially if I work from home and have something pulled up in Eclipse.


I started programming when I was 6 with Logo at school. Moving the turtle to where I wanted made me smile. :) At the end of the day, it's about having fun doing programming.

I would recommend the same. #Logo


I've had some moderate success using Racket as a math supplement tool, but I waited for late 4th grade for a child that was already mathematically motivated.


I'd wait at least 5 years. If they really want to start early, they will, with or without you. But if they don't, then don't force it.



Just give them a computer running Linux with no GUI & a copy of the Linux pocket guide, remove other distractions, and apply time.


I'm still working on getting her to sit still long enough to eat dinner in a timely fashion. :)


Unless your 5-year old has independently expressed interest in learning to program, I'd say the best way is to not do it. I could be way off here, but to me this smells like a parent who wants to be able to brag to other adults that their child is so smart that they started programming as a 5-year old.


Don't!


While I agree. It might not hurt to explain why you think this way. For me, 5 is pretty young. At that age it might be better to focus more on building blocks that will become useful for programming in the future. Stuff like basic problem solving, identifying things that could be improved.


Minecraft, playing with redstone and switches


Use lego mindstorm


Get them to play with Legos, or help with household chores or something, explaining the process of what you are doing step by step. Try to get them thinking logically.

I couldn't even read at five years old, I certainly wouldn't have been able to make heads or tails of computer programming.


The best way is to learn the fundamentals first, focus on linear algebra and calculus to have a good understanding of math. It could get a bit tiresome at first, so you could start doing some assembly programming in between to be a bit practical. The 68000 is really easy to get into.


Thanks for making me smile but actually it's not a bad idea to open children quite early to the concept of functions and related ideas. Of course you wouldn't use the name "function", but rather a "machine" - and then play the "what comes in, what comes out" game, for example. The ability to correlate two (and more) variable changes is very useful in life, but spotting these occasions and use them to point out certain facts involves some skill on the parents' part.


It would be good to get an early start on quantum mechanics and string theory if you want to start slow, that's kind of babying your kid too much though.


Linear Algebra, Calculus and Assembly for a five year old? You surely must be joking, Sir.

Okay, you are joking. Nice one.


Do you have any experience approaching these topics with a 5 year old? If so, can you share?


For basic algebra, Dragon Box Algebra is nice. My five year old has gone through that and is working his way through geometry and the algebra 12+. (He just plays occasionally - iPad time is weekends only and he chooses what he wants to do.)

It’s mentally taxing, so I encourage him to switch to a different game when he starts getting fatigued. (It rewards by gradually drawing a monster and unlocking more skills.)

For assembly, you could try “human resource machine”, but it gets hard too quickly. Light Box Jr might be more appropriate, though. ScratchJr is also worth checking out (it is more open ended rather than just gameplay).


I don't think I could grasp basic algebra until about 14 and my classmates too XD


I think you exaggerate. My kid routinely asks me for riddles of the "x plus seven equals fourteen" kind. That's basic algebra.


I came from a family that didnt really care about school I guess, and I don't think I was even presented a problem like "x - 4 = 17" until maybe 12 years old, and I didn't understand why it was useful until 14




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: