25

At what age should I expose my child to coding in order to see if they like it?

Some argue that 5-6 years old is a good age to start coding (1, 2, 3, 4, 5, 6). I am looking for answers based on personal experience or on research, rather than opinion-based answers.

RELATED:
What are some milestones a child should reach before learning programming? (note that this question explicitly says: "I'm not asking what age should a kid be to start learning programming.")
Alice and Scratch ages 8+, how about under 8yrs old?
Suggestions on starting a child programming
What is a good programming language to start my Grade 1 son learning?


EDIT:
Just for the purposes of this question, feel free to address both coding and programming, even though these terms are not equivalent in general. For example, using Scratch and similar block-based languages, or playing with Big Trak are relevant. Also feel free to adress activities that resemble programming. For example, playing a game where the kid gives instructions to another player who pretends to be a "robot", or playing with Turing Tumble are relevant.

11
  • 1
    Does this answer your question? What are some milestones a child should reach before learning programming?
    – user130558
    Commented Mar 15, 2021 at 13:42
  • 4
    Timur - I'm voting to close this as opinion based, because there's no good answer to "when should children learn to code." Every child is different, and for some the answer is "never" and for some the answer is "today". Are you asking "At what age can a child learn to code who is expressing interest?" Or are you asking more along the lines of "at what age should I expose my child to coding in order to see if they like it?" Or even "in order to give them some concrete benefit" akin to people who force piano/violin/etc. on their children?
    – Joe
    Commented Mar 15, 2021 at 15:07
  • 1
    Thanks for the clarification. It's still a bit at odds with itself though - you ask 'at what age should I teach' but then you say 'I was wondering about the pros and cons of teaching children programming so early. ' Do you want to know what age should one expose one's child to programming, or do you want to know what happens if one exposes one's child to programming at a certain age?
    – Joe
    Commented Mar 15, 2021 at 15:45
  • 4
    IMHO, the question is still poorly defined. In particular, what does "code" mean here? A 3 year old cannot write novel, useful programs; they don't have sufficient proficiency in abstract thought. But, one of my children started using Scratch at 3; it even served as motivation for them to learn to read, because we refused to read the blocks and other screen elements for them. Their ability to use Scratch in some fashion developed quickly, well before their 4th birthday, but I wouldn't call what they were doing coding. But maybe you would. ... Commented Mar 18, 2021 at 1:13
  • 3
    ... Frankly, there is no "too early"...as long as you're not forcing them to do whatever it is you think is "coding", they can be exposed to it at any age. Commented Mar 18, 2021 at 1:14

10 Answers 10

5
+200

At age 4 I was given a ZX Spectrum 48k computer and a book published by Usborne called BASIC for Beginners.

From that moment on I was hooked.

The next year I was given Practice Your BASIC.

By age 8 we had a PC in the house, and I started trying to teach myself C using the book The C Primer. Pointers really confused me back then, and I gave up after a while and didn't go back to C for at least ten years. I amused myself writing DOS batch scripts, and the occasional light dabble with very short bits machine code gleaned from computer magazines.

My brother, however, had no interest whatsoever in programming.

I would recommend you provide your child with the tools (a computer and reference materials) and see if it's something they're interested in or not.

Note that I was never pushed into it, nor even supervised while I was doing it - it was completely self-driven, which I think made it more interesting and exciting for me. If I had to be sat down and shown then it would have felt more like a chore, and maybe then I wouldn't be the programmer that I am today?

(The Usborne programming books from the 1980s are now available for free online, by the way: https://usborne.com/books/computer-and-coding-books )

9
  • 1
    How much instruction (if any) from parents did you get? Did they at least help you write and run something like Hello World program (e.g., the very first piece of code)? Commented Mar 16, 2021 at 20:12
  • 2
    @TimurShtatland I think the equivalent today would probably be a Raspberry Pi with an electronics kit (a breadboard, various sensors, LEDs, switches, resistors, etc) and a book with some interesting projects.
    – Aaron F
    Commented Mar 16, 2021 at 20:22
  • 3
    @TimurShtatland About fifteen years ago I remember that the LEGO Mindstorms robotics kit was another good way to get children interested in using technology and programming to make fun things. A quick search shows me that they're still making Mindstorms, but the latest version says "Retiring Soon" on their website; so maybe a new version is just around the corner?
    – Aaron F
    Commented Mar 16, 2021 at 20:25
  • 2
    @TimurShtatland good question...and a tricky one! The Raspberry Pi and LEGO Mindstorms are both aimed at slightly older children: from age 10 upwards is recommended, although I think that a bright 8 year old wouldn't have too much trouble. Debugging problems with electronics can get frustrating though. The LEGO has the benefit of being physical - when something doesn't work quite right you can often see where you've gone wrong, and the feedback loop of identifying and then fixing a problem is shorter, which reduces frustration. [1/2]
    – Aaron F
    Commented Mar 16, 2021 at 20:49
  • 2
    I can totally relate. I had a Dragon 32 when I was 6, then an Amstrad CPC 6128 when I was 8. I started typing in programs from magazines then playing about with the text and numbers and seeing what happened. This is how I taught myself basic programming and used this knowledge to write my own programs. I had the aptitude and desire to learn how to make my own games because my pocket money didn't stretch to more than around 1 full price game a month. My interest never waned and now I code for a living after gaining a degree in Software Engineering.
    – The Betpet
    Commented Mar 17, 2021 at 10:48
25

This is very dependent on the child, as are all questions of this sort, but 5-6 is certainly possible.

My children, now eight and nine, were first exposed to programming in a meaningful way at around the age of 4-5. We started with simple games that are "programming lite", which basically involve the child creating a "program" either to get a piece from one place to another with instructions, or in one case "programming" the parent to do whatever the child wants them to. That teaches the concept of step-by-step instructions, boolean logic, and even functions (you can make a "function" of several instructions, then call that function instead of repeating the lines). They also had programmable robots (actual robots with iPad apps that let them give them repeatable instructions with a block-based language, including logic gates and loops and functions). Those are very fun at that age.

This led us to recognize that they - and particularly the younger - were interested in programming, so we continued along those lines. At around six, Scratch or similar block-based languages are very accessible. They used them to both build simple programs and to see others' much more complex programs in action. Mostly we didn't push anything here - they had a few books that guided them through the initial steps, but for the most part this was about learning to have fun with programming and do whatever silly thing they wanted to do, even if it was fill the screen with cats meowing, or make a ball that bounced indefinitely.

Around seven, both children started learning Python. The oldest got bored with it to some extent, but the youngest really took to it and programs on his own for fun, or to solve problems (like randomizing choices for music lessons). Although they're not able to program anything complex yet, they understand the basic concepts and have a desire to learn more - which we will certainly enable as much as possible!

Pushing, though, doesn't really work at this age, and I don't recommend it. Expose them to programming and see if they like it - this is very possible at five or six, either through games or through beginning programming experiences with block-based languages; and then pay attention for when they're ready to go to the next step. My kids are both relatively early readers, which meant I could teach them Python at seven - but I'd suspect many kids need to wait a few more years before their fluency is sufficient. Scratch/etc. are great since they don't require as much reading - you can learn what the blocks are by shape recognition.

2
  • 2
    Scratch uses fairly simple language too, but some of it is used in programming-specific ways. I've also done some Scratch over the last couple of years with my 7-year-old (most recently a sound effect machine which works on a tablet - click icon, get appropriate sound, with some random elements, used when her Lego people have adventures). I first used BASIC when I was 8, and while not a good programmer I can make most things work and pick up new languages OK. That was to extend some maths homework to much bigger numbers, i.e. with a goal in mind; that always helps
    – Chris H
    Commented Mar 16, 2021 at 14:19
  • 5-6 is certainly possible – I taught my daughter (rudimentary) C at 6. It's certainly possible.
    – forest
    Commented Apr 26, 2021 at 3:22
24
+50

I'm a fan of building up a programming mindset without even needing to use a computer. One good example is the peanut-butter sandwich game. You pretend to be a robot, while the child gives you instructions which you execute with painstakingly literal precision.

  • Child: Put the peanut butter on the bread.
  • Parent: [puts the unopened peanut butter jar onto the bread (still in the bag)]
  • Child: Okay, take the bread out of the bag.
  • Parent: [removes bread from bag]
  • Child: Now open the jar.
  • Parent: [robotic voice] FURTHER INSTRUCTIONS REQUIRED
  • Child: Turn the lid on the jar.
  • Parent: [turns the lid, but the whole jar turns]
  • Child: Okay, hold the jar in one hand and turn the lid with the other.
  • Parent: [turns the lid, but the wrong direction so it tightens]
  • Child: No, no. Turn the lid the other way!

etc.

This gets the child thinking in a programmer's mindset without having to be dragged down by the nitty gritty syntax of any specific programming language. And you can start at a very young age, basically as soon as they're old enough to know how to perform basic tasks like making the sandwich in this case. And they're motivated because when the task is complete, they get a tasty sandwich at the end. (It's also really fun to mess with kids this way.)

11
  • 2
    Neat idea, thanks! I wish there was also a mechanical game equivalent of a programming language, complete with conditionals, loops, functions, etc... Sort of like Scratch, but based on physical objects (and not requiring another person to play it)... Commented Mar 16, 2021 at 14:54
  • 7
    @TimurShtatland For a loop, you could add the next step: Parent: [turns the lid just a bit, not enough to open it]. Child: Turn it some more. Parent: [turns some more but still not enough]. Child: Keep turning it until the lid comes off. Commented Mar 16, 2021 at 20:58
  • 3
    An elementary school teacher of mine did this exact exercise with our class (I think it was in 5th grade), and it was a really good way to get kids thinking in an algorithmic way. Even outside of teaching programming skills this also teaches kids both how to express themselves clearly and how to break problems down into smaller parts, which is a useful skill for anyone to have
    – Kevin
    Commented Mar 16, 2021 at 22:00
  • 1
    @DarrelHoffman: Parent: [keeps turning the lid even after it can be taken off, since the lid didn't actually come off].
    – user21820
    Commented Mar 17, 2021 at 6:58
  • 2
    @TimurShtatland You mean, like a Big Trak? Commented Mar 17, 2021 at 12:56
20
+100

The more people know about computers the later they appear to let their kids near them. This Business Insider article has a few observations and quotes:

Gates, for example, didn't let his kids use cellphones until they were 14. Jobs, the inventor of the iPad, prohibited his own kids from using the tech.

To safeguard their kids, tech worker parents often send their kids to Montessori schools — elite schools that focus less on tech and more on building a child's emotional, social, and intellectual wellbeing all at once.
Others send their kids to Waldorf schools, which take a similar anti-tech philosophy. In Los Altos, California, Waldorf of the Peninsula still uses pen and paper and sometimes even mud to mold young minds.

"Here I am at MIT, surrounded by super techies, and same story here," said [MIT psychologist] Turkle [...]. "Everybody's at a Montessori school and has rules about no computers at the dinner table, no computers at breakfast, no computers here, no computers there, no computers in the classroom."

Of course, programming may be seen as a way to become a competent computer user but looking at my home office self discipline as a programmer I very much doubt that preschoolers deal better with temptation than I do.

My personal experience with my son was that deep talks in person (and every talk can become deep if you don't evade and give the best you've got to answer questions) were the most productive for his young mind. It's your enthusiasm and emotion coupled with your knowledge that counts. Time together counts. Tech is rather unimportant.

16
  • 21
    Discouraging or forbidding computers at certain situations is very different (one could even argue the exact opposite) of teaching kids about programming. The latter is to teach kids how to master machines while the former is teaching kids how not to be ruled by them. One of my best university teachers never had a computer on his main office desk, yet he very much used one and was very profficient at telling it what to do and how to do it.
    – Pavel
    Commented Mar 16, 2021 at 5:21
  • 2
    @Pavel True. I addressed that in the penultimate paragraph mentioning the self-discipline. The general trend of the digerati is clearly not embracing the computer though and instead focus on "real" experiences. Whether they make an exception from that trend and let their kids learn how to program is anybody's guess. Commented Mar 16, 2021 at 8:09
  • 4
    I appreciate this answer but I'm a little unclear on two points. First - do we know why Jobs disallowed cellphone access? There are countless reasons to restrict that but still encourage access to an offline home PC to learn BASIC or whatever. Second - my limited understanding of Montessori schools are that they encourage learning in whatever the student wants. If a child wanted to learn coding, they'd be encouraged to. I'm not sure if these things are evidence against teaching children to code or just some parents avoiding certain technology and public schools.
    – Rob P.
    Commented Mar 16, 2021 at 9:55
  • 24
    Giving them portable media consumption and chatting devices (in your quotes the examples given are "cellphones" and "iPad"s) is not the same as teaching them to code on a laptop or desktop.
    – Luc
    Commented Mar 16, 2021 at 10:41
  • 6
    @Peter-ReinstateMonica Okay, I'll rephrase that. This is, objectively, not an answer to the question. Corporate tech executive opinions on cell phones are irrelevant to pretty much any conversation, let alone questions about programming. And advice about having deep talks is off topic because this question is not "what, in your opinion, is the best way to keep a child's mind productive?".
    – Clay07g
    Commented Mar 16, 2021 at 15:59
10

"Code" is not the same as "programming". For example, my daughter played an app called Coding Safari (https://www.hopster.tv/coding-safari/) when she was about 3-4yo. That app is based around dragging and dropping instructions that a "robot" can follow. She did similar things at nursery and early years school at the same age with physical robots - Bee Bots I think they are called.

So she already has the basic concepts of algorithms such as following a sequence of instructions, including loops and conditionals. But it was well before she was comfortable reading and writing (and typing) significant quantities of text and other symbols (e.g. brackets).

Did this tell me if she likes it or not? That is hard to determine - young children are very flexible in their preferences, and the cosmetics make a huge impact. Particularly with programming, the end result can be rather abstract (especially for what is achievable by a beginner or individual) which makes it harder for youngsters to reason if it is something they like or not. We'll continue exploring computing concepts (e.g. we're currently playing https://shapez.io together) though she won't be "coding" for a while yet. Certainly she hasn't developed that "fear" / "intimidation" reflex many older people have around technology, and if that's as far as it goes I will be happy with it!

4
  • 3
    Good point. Personally I started “programming” when I was 7 or 8 on the Lego Mindstorms RCX which had this graphical programming interface where you could build programs with blocks. Unfortunately it was pretty limited and I had nobody to teach me a real programming language.
    – Michael
    Commented Mar 16, 2021 at 10:25
  • 1
    Yeah, I agree there is definitely a danger of a "gap" between those kinds of introductory resources and jumping to a "proper" programming language such as Python, and in particular the concepts that go with it (e.g. object orientation, debugging, etc). Thankfully I think other people have see that gap too, and there are resources like eraseallkittens.com and child-friendly hacakthons are starting to exist to fill it. Commented Mar 16, 2021 at 10:45
  • 2
    If I were going to draw a distinction between "coding" and "programming", I would do it the other way around - i.e. "coding" is writing text in a programming language, while "programming" is giving a computer step-by-step instructions by any means possible.
    – Brilliand
    Commented Mar 16, 2021 at 22:42
  • 1
    @Brilliand Couldn't agree more. Coding is talking to the machine; programming is thinking about what to tell the machine. I cringe whenever I see people encouraging kids "to code": to me it's an almost acritical tool that will be used wrong sooner or later.
    – Simone
    Commented Mar 17, 2021 at 15:57
4

This answer doesn't have much to do with programming, but...

When my daughter started learning non-trivial word problems in arithmetic (around second grade (in the US)), I started to encourage her to do them symbolically. She initially pushed back. But, by the end of that school year, she had a reasonable grasp of elementary algebra (and a confused teacher). That step to symbolic problem solving is a critical first step not only for math, but for things like programming.

From there, I took the tact of @DarrelHoffman's peanut butter sandwich programming answer, but very low key - not as explicitly as his answer. I think we may have even had an elementary school-age birthday party game that was a cross between his peanut butter sandwich efforts, pin-the-tail-on-the-donkey and a Roomba (one kid puts on a blind fold while one (or more) write and say a "program" to get the blind-folded kid around some obstacles to a chosen place).

She never took a liking to programming. Perhaps following mom and dad into engineering school was enough, but following dad into the software development business was a bridge too far. She, of course, took programming courses, both in high school and university (and, I'm guessing she creates some useful/complicated Excel spreadsheets as part of her job). If you don't think that creating a complex spreadsheet is programming, look up "cellular automaton".

Whatever you do, don't push your kids into it. Software development is something that some folks love, and some folks hate. Not learning to "code" at age 8 isn't going to prevent him/her/they from doing whatever they want when the time comes for them to decide what they want to do.

2

I was taught programming from about age 4, in my mom's lap. I learned in GW-BASIC. She did it for her job, and she worked from home, so initially it mostly entailed her thinking and writing out loud as she did her work.

Apparently, it took about four months until I had my first "But why don't you -" moment, after which she gave me the (extremely fat) language guide and gave me access to an old computer to start doing things for myself. She would often help when I asked, but most of the time I discovered on my own and learned the things I wanted to learn at the time.

Initially, I mostly wrote small ASCII based maze games. And, of course, I did a crappy version of pong.

And now, almost 30 years later, I am still going strong.

1

When they show a clear interest in a deeper understanding of computers.

And yes, that can very easily happen at pretty much any age. For some, it may take 3 years. For some, it may take 6 years. For many, it takes 12 years. For most, it never happens. And you should be able to accept that. Computers are really not very interesting to anyone who is not interested in computers.

I don't understand what is it about people these days thinking that programming is an essential life skill that must be imposed on every child. It is NOT. Don't ever project your passions onto children. It is a recipe for disaster. If they become curious naturally, then there is certainly nothing wrong with encouraging them, but to shove a child into anything they are not interested in themselves, is simply going to discourage them further down the line.

Unlike most artistic and language skills, programming becomes easier to learn as you obtain other relevant abilities and it is not something that takes 20 years to get good at, so there is not a whole lot of motivation behind exposing children uninterested in the field to the pain and suffering of software creation, besides the selfish desires, of course.

A bit of a hot take, admittedly, but I have seen this kind of a question one too many times and it always irritates me how eager parents are to decide their children's careers. There are skills far more universally useful than programming.

2
  • 1
    I meant exposing the kids to programming to see if they like it, rather than deciding on their career. I intended to "expose" to this field in the same sense as kids are exposed (sometimes at an early age) to crafts, drawing, painting, singing, playing musical instruments, growing plants, taking appliances apart. That is, without deciding on their career, just to expose them to a healthy variety of skills and activities, to see if they like them. In the long list of things that kids learn in preschool and school, programming might fit as well. My question is at what age, if at all. Commented Mar 18, 2021 at 14:58
  • 1
    @TimurShtatland If that's the case, then there is nothing wrong with it, of course. I assume these children in question use all sorts of electronic devices, so it shouldn't be much of an issue to ask if they'd like to learn about how they work and how to control them in a more low-level fashion. There's no age at which this becomes possible or desirable. Children develop vastly differently. I know many people well into their twenties who are still incapable of comprehending software engineering techniques. Every decent programmer I'd ever met learned pretty much completely on their own.
    – natiiix
    Commented Mar 18, 2021 at 19:53
1

Firstly and most importantly I must agree with some of the posts below that when to begin is dependent on the child. I have done some research on "Technische Frühförderung", which somewhat insufficiently translates as early support or intervention in tech, and gave a talk on it in a kindergarden. I also did a class on Computer Science for 7, 8 year olds. (But I am a programmer, rather than a teacher) I think that from the beginning you can and need to support children in improving a technical/ programming talent. Things like letting children experiment with things, to learn cause and effect, supplying them with toys to build things like building blocks and tools. Even before being one year old, a child playing with different small plastic containers like cups of different sizes and water can learn a lot and have a lot of fun.(Montesori's games with different containers and water) Get in the habit to let them start make decisions on their own (on age appropriate things, like which playground do you want to go to, what fruit, toy, pullover do you want, ..) How should a child which is always told exactly what to do be able to find solutions to problems on their own later on? Following a procedure is important to learn, and most effortlessly done with following an easy cooking recipe. Working with others is important, braking up tasks into parts too – all that can by done by tackling some household or building task together in your family. Explain to kids from the beginning of their understanding language why and how things work, even if it leads to endless questions bordering on 'torture your parents'.

Of course there is talent. While the above are good tactics for all children, there are those with other talents, don't push them in another direction if they don't want to go there. As Knuth says, “you have a talent for programming, or you don't”. To finish up, actual coding with a programming language can be taken up by the age by which your child can read and write in a basic form. Some can do that by 5, some later. But coding things with visual support can start much earlier with children having a technical talent, surely 3 to 4 years old. You can offer them programming by showing them how to use an appropriate programming tool, teaching them coding structures like repetition, condition, objects. There are tools for that with relateable “characters” like bees, turtles, robots. But let them choose on their own when to start using it. You can offer them going to a playful programming class with other children, if they like that. In any case, it is wonderful to watch them develop that talent, isn't it! PS: You can look at the work of Linda Liukas for some ideas for beginning coding for example.

0

"Code" , or "programming" software should be viewed, so far as intellectual and conceptual development goes, as no different from the "code" that is the alphabet, or even a picture book which tells a story through the behavior of objects in sequential drawings.

All of these things indicate the brain's ability to convert symbols into concepts and actions. A picture-book story is essentially the same as an icon-based programmming language such as Simulink or LabView.

Given all that, my personal recommendation is to present kids with the child-compatible programming software and let them decide whether it's fun to learn to create stuff onscreen.

2
  • 4
    I'm not necessarily disagreeing with any of this, but the flip side is that the skills needed for writing code are often more in the planning and stepwise treatment of a problem (or at least those are the skills our undergrads lack). The symbols->actions part is relatively simple
    – Chris H
    Commented Mar 16, 2021 at 14:15
  • 2
    @ChrisH No argument. Learning to plan and design is kind of a separate skill that kids need to learn for all sorts of stuff -- like "how many Legos will I need to build my model treehouse?" Commented Mar 16, 2021 at 14:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .