I am thinking of offering classes for people, maybe take 5 to 10 at the time. There would be 4 hours every Saturday, twice a month, for three months. So in total 6 such sessions. The language thought would be Javascript (and HTML, CSS).

I was planning to offer it to adults and kids, and especially interesting would be for a parent and child to do it together.

What do you think is a minimum age for which I should accept students, alone and with a parent?

  • 1
    $\begingroup$ This seems like a good idea. $\endgroup$ – ctrl-alt-delor Nov 9 '18 at 11:03
  • $\begingroup$ Why tag as classroom-management? $\endgroup$ – ctrl-alt-delor Nov 9 '18 at 11:04
  • $\begingroup$ Please avoid discussions in the comments that are not about clarifications/improvements to the question. Comments which do not suggest improvements or request clarification will be removed. $\endgroup$ – thesecretmaster Nov 12 '18 at 15:35
  • 2
    $\begingroup$ Have you already planned course content? I honestly can't see you getting much done in that time. I don't mean this to criticize, just to make sure that no one gets disappointed. Of course, if they all did lots of homework, they would learn much more. Perhaps work them through a book or tutorial, where you spend the first hour answering questions about the last assignment and the rest explaining the next? $\endgroup$ – Mawg says reinstate Monica Nov 13 '18 at 15:18
  • $\begingroup$ Just anecdotal, but I discovered programming when I was 12, and taught it to myself with the internet at that point. So I'd assume that with formal guidance, students a year or two younger could probably learn it pretty well. $\endgroup$ – Patrick L Nov 20 '20 at 1:38

16 Answers 16


Let me urge a bit of caution if you try to combine teaching of youngsters with their parents. Before you decide, you should look at the work of Piaget on the stages of development. Adults and teens from about 12 can learn abstractly, but those younger probably haven't yet developed the changes in the brain (including physical changes) that make that possible. Starting from around 7 kids can learn things like computing, but only very concretely.

I bring this up so that you don't wind up with classes that serve no one very well and frustrate everyone. Some programming environments stress the concrete and are good for youngsters (Scratch, Logo, and other visual systems) but adults learn very differently.

If your goal is primarily to have the parents help their younger kids to learn while learning just a bit themselves, then, I think you can be successful. Just keep it concrete and probably visual. But if you are asking more of the parents, then they might not be so satisfied and you will be inundated with questions that come from their deeper way of thinking and that won't have answers that the kids can grok.

On the other hand, if you want to start with teens and older you should have a group that is much more uniform in their mental structure and abilities so it would make a wider variety of techniques possible.

  • 2
    $\begingroup$ You might also want to consider whether some but not all parents present is a viable situation. I think it adds a complication, though not necessarily a blocking one. Some adults might not want to be embarrassed in front of other people's kids, but might not mind it so much if it is their own. Something to think about anyway. $\endgroup$ – Buffy Nov 9 '18 at 15:45
  • 28
    $\begingroup$ @Ska Also be aware that JavaScript, while useful, is an iffy choice for a first language because of really weird semantic rules and an almost complete lack of coherent structure; it tends to engender all sorts of bad habits. Python or Ruby would be my recommendation. $\endgroup$ – chrylis -cautiouslyoptimistic- Nov 10 '18 at 0:58
  • 5
    $\begingroup$ 12? No way. I was beginning to learn about programming and abstract concepts that underlie it at age 8! $\endgroup$ – Mason Wheeler Nov 11 '18 at 15:38
  • 6
    $\begingroup$ @MasonWheeler, Piaget and the research that underlies it is well accepted and has stood for a long time. There are exceptions, of course, as the results are statistical, but don't reject it out of hand. $\endgroup$ – Buffy Nov 11 '18 at 15:41
  • 3
    $\begingroup$ @Buffy Just noting that the science doesn't claim it has stood up for a long time. "Studies have found that children may be able to learn concepts and capability of complex reasoning that supposedly represented in more advanced stages with relative ease." is what you will find if you read up on it. Additionally there have been a lot of alternative better founded theories which are both more dynamic and more fluid. In general as an educator it's best to ignore those stages completely as it advises generalizations for a different culture and time. $\endgroup$ – David Mulder Nov 11 '18 at 19:51

The minimum age

I honestly don't think there is a minimum age. While it's true that very young children have a harder time thinking in abstract terms than adults, it does not mean that children are incapable of it. For example, I started teaching my daughter very basic shell commands at 7 years old. She's now 10 and is relatively fluent with the command line and can even write basic C programs.

For her, the most important thing was to make it a requirement for her to use at least the very basics of the language in order to utilize the computer. For her, I gave her a Debian-based system that was all hers. However, while I gave her a flash drive with a few games to play, I did not provide desktop icons for them. She had to learn how to open a terminal, change directories, mark files as executable, and run them. That satisfied her for a time, but eventually, she wanted to do more, like set a timer on the computer. That's when I taught her how to use the sleep command.

Other children might not learn the same way. You may not be able to or want to, restrict their access to easier-to-use operating systems. Each child learns best in a different way. Despite that, there are a few things that everyone requires to learn a programming language:

  1. They must be comfortable typing (real typing, not hunt-and-peck typing).

  2. They have to have a language that lets them do something, not just see "Hello, World".

  3. They need to enjoy it as a learning experience, not a chore.

The choice of language

I would strongly recommend against JavaScript. The language is convoluted and often does not make sense intuitively. As for HTML and CSS, those are not programming languages but languages designed for markup. Unless you go into the complex HTML5 + CSS3 territory, they won't be enjoying it any more than you enjoy learning new serialization formats (which I presume you don't).

Instead, I would recommend something like Bash. For a language that is more powerful, I would suggest either C or Python. The latter is certainly easier to learn, but C can help give a better understanding of low-level memory handling (yes, even young children can learn the difference between the stack and the heap!). Additionally, Python likes to enforce a maxim where there's only one correct way to do something. This can limit creativity. There's nothing more enjoyable than giving a child a task and seeing them come up with a solution that you didn't even think of yourself!

Getting them interested

No one likes being forced to understand an abstract concept that they do not enjoy. If programming is taught as a strict logical language, it will be no more fun than math is for many kids. If, on the other hand, accomplishing a task will allow them to reap a reward, motivation goes way up. This can be done easily with robotics. Everyone, both boys and girls, loves robots! Machines like the Lego NXT can be programmed either using a silly graphical interface or in pure C.

Basic programming can be learned by using an operating system shell. For children raised in the 80s and 90s, that often came from BASIC from various personal computers (Amstrad, Sinclair, etc.). Nowadays with fancy GUIs, that skill has been lost. You can re-introduce it with a shell of some kind, whether it's something like FreeDOS (a FOSS version of MS-DOS) or a Linux or UNIX distribution, a shell allows someone new to programming to see immediate results.

  • 11
    $\begingroup$ "They must be comfortable typing (real typing, not hunt and peck typing)." Thats not even required for professional programmers, I know an absurd amount of really good programmers that still can't "properly" type. Because programming isn't about typing fast, its about thinking abstract and being able to see how things work together, and being able to properly test stuff. Sure, you need to write the software at some point - but thats hardly the most time consuming thing in programming anything. $\endgroup$ – Polygnome Nov 11 '18 at 18:16
  • 11
    $\begingroup$ I can not recommend against JavaScript enough! PHP, JavaScript and C# should be avoided, imo (though Jon Skeet would disagree with that last one, I don't know anyone who'd disagree with the first two). Python's a good language to learn, though C isn't intuitive enough for young-me to have learned. Too much memory management. If C allowed you to join strings easily without having to first calculate their size, I'd be all for it... but it's that strings thing that's the problem. (And honestly, the point of the language is that you can't just do string + string and have it auto-malloc.) $\endgroup$ – wizzwizz4 Nov 11 '18 at 22:25
  • 2
    $\begingroup$ @Polygnome steve-yegge.blogspot.com/2008/09/… $\endgroup$ – forest Nov 12 '18 at 1:18
  • 3
    $\begingroup$ @forest That blog post is a rant and has no sources, and the language used in it really doesn't help making a point. I do not disagree that touch typing certainly is beneficial - it is - but its a very small thing of what makes a great programmer/engineer. You can be an amazing programmer/software engineer without touch typing, but the other way round doesn't work. being able to touch type doesn't make you a good programmer. teaching a kid to touch-type before teaching him to get results will most definitely make them lose interest before you get them hooked. $\endgroup$ – Polygnome Nov 12 '18 at 10:05
  • 1
    $\begingroup$ Touch typing is not a requirement. Good and efficient typing still is. It doesn't need to be full touch typing. Granted, this is not a requirement for young children. $\endgroup$ – Gábor Nov 12 '18 at 20:38

This is a much less useful answer than I wanted it to be, but I'm posting it in case it helps someone.

I'm not a teacher, but I've found that most 13-year-olds can learn to program using production languages (Python's a good one). However, I'll regale what I remember of my experience learning my first programming language. (WARNING: Tangents ahead.)

On a Windows 98 SE1, aged five or six2 I was trying to open All Of The Things™ to see what would happen. I happened to right click autoexec.bat, and there was an option called "Edit"... which opened up Notepad! When I double-clicked it, it popped up a message saying that I "couldn't run Windows when Windows was already running" but when I pressed "Edit", there it was! Code that I could read!

It wasn't long3 before I realised that you just needed the .BAT extension. All of the programs I'd written looked like this:

@echo off
echo Hello!
echo This is a secret message.
echo Press a key
pause > NUL

Because I'd never seen any examples of a batch file other than these examples, I didn't know that you could run arbitrary programs from Batch files. I did know that you could run command /?, so when I found another batch file with an IF command in it, my programs evolved to:

@echo off

echo Secret Message!
if exist secret.txt type secret.txt
if exist secret.txt pause
if exist secret.txt exit

if not exist secret.txt echo Enter your secret message > secret.txt
edit secret.txt

Crude, I know, but I didn't know about the web back then. (In fact, I thought Ethernet was the modern version of "Internet" (a modem port) and used neither, save as a magical device that brought back flash games when the browser crashed or I accidentally hit F5.)

I also discovered that Windows popped up a scary warning message about system instability when I renamed the .bat file to .com and tried to run it. I always wanted to make a proper executable program.

I later learned Scratch 1.4 on a Windows XP machine (aged 6 or 7), though I was thrilled to bits when I discovered that XP supported Batch Files too.4 Scratch didn't let me make .EXE files, but that didn't really matter because I could make proper games and had all of the blocks available to me. (Now I have "documentation", where I can find new blocks, but I didn't know about that at the time.)

Later, I learned JavaScript on Khan Academy, but got frustrated when I couldn't just copy the JavaScript into a .js file and run it... so I gave up. This was because I wasn't told the difference between JavaScript proper and the Khan Academy-provided functions. (I also wasn't told that you needed a web browser to get a DOM and graphical rendering.) I later got a Scratch account and was introduced to Small Basic by my primary school head teacher; the rest is history.

I expect that, if I'd had programming super-geniuses around me to help, I could've been building web pages with JavaScript (instead of saving Word Documents as boring, non-JavaScripted HTML/inline CSS files and manually stripping out the Word cruft through trial and error) and programming fully-featured executables in Small Basic (instead of not even being able to imagine the concept of a compiler) aged 8. Though... the skills that allow me to quickly pick up new languages now were acquired through lots and lots and lots of doing-it-myself and figuring-it-out, so being babysat and hand-held through the process would have hindered, not helped.

1: a parental discard (as with every laptop up to my very first (which I recently fixed up (read: replaced non-functioning Windows with functioning Debian) and am currently typing this answer on)) which, if I remember correctly, was reinstalled twice after it became completely unusable (MS Paint scribbles were painstakingly preserved via floppies).
2: perhaps around the time I discovered the File Associations dialog and was disappointed that I couldn't make a .wizzwizzfile type that was a valid WAV, TXT and BMP file (an idea I got from my open-everything-in-Notepad phase, which lead to the destruction of Microsoft Paint and many, many tears before it was recopied from the installation disk)
3: at 30 minutes a day, maximum; permission had to be sought every time I wanted to use a laptop
4: I remember noticing that XP supported multi-line IF, but 98 didn't; my only emotion was annoyance, and only very minor excitement at discovering the annoying workaround and manually porting the programs back by duplicating the IF line.

How is this relevant? Well, it tells us a few things about how young children can learn programming:

  • The child needs to be curious. Don't just sit them down and start talking at them. Don't just show them a flashy animation or a neat game and say "You can make one of these!"; they need to have questions. If they're not interested in figuring it out, they're not interested.
    I recommend asking a parent / young-child-teacher how to get a child interested in something.
  • The child needs to have something to tinker with. For me, it was Windows 98; as a DOS-based system there was an accessible, interesting "puzzle", but as a Windows system there was a nice friendly GUI that wasn't easy to break.
    I still have a deep-rooted fear of white-on-blue monospace jumpscares and system beeps, so I'd recommend giving the children something that, when it fails, uses no new UI elements (no persistent red bold text, no popups with a yellow warning sign, etc.). If possible, it should keep on trucking. My recommendation would be Debian with LXDE, with a short GRUB timer, without wireless web access, for the following reasons:
    • YouTube is very good at distracting without educational value. You don't want the child to discover YouTube. Even the most banal flash games have more educational value than endless novelty, since they can provide inspiration. YouTube stifles boredom, so stifles curiosity. The computer shouldn't become a YouTube machine.
    • Manuals can be downloaded. The only thing that can't be downloaded is Stack Overflow, but they're too young for that anyway; you need to be able to distinguish between good and bad answers to use SO, and SO assumes a minimum amount of knowledge. man manuals are the right sort of difficulty, I think, since they're as easy to understand as their topic, but boring enough that they aren't your first port of call (you try to figure it out yourself first).
    • GRUB shouldn't be discovered early. GRUB should be part of the pretty pictures that show up while the computer is booting (after the manufacturer logo and before the scrolling text), but it shouldn't hang around for 5 seconds. 5 seconds is long enough for a child to get bored, mash some keys, and the computer to not start up. But eventually the child will get curious about what those pretty pictures are, and mash some keys.
    • Debian is mostly stable. It doesn't BSOD when you do strange things, and even if your keyboard-mashing happens to be a valid ELF file and you set the executable flag and run it, you're not going to overwrite the kernel or trigger a system crash (just the humble segfault).
    • Most things are text files. In Windows, if you manage to crack the shell-level dereferencing of .lnk files (not .Ink files) and open one directly in Notepad, you'll see a binary file with T e x t t h a t l o o k s l i k e t h i s that you can't edit easily because those "spaces" are actually null bytes; in Debian, if you "right-click -> Add to desktop" a program, you'll get a text file (INI, iirc) that you can tinker with.
    • Debian's used in real life. The only other OS (family) that I know of that matches enough of the criteria is DOS-based Windows, but almost nobody uses that any more (so its knowledge, while still serving me well multiple times a week, is a lot less useful) and its warning messages are scary. Debian's are scary too, but not quite as scary and only when you've used sudo to mess something up. Which brings me to the next point:
    • Non-elevated users can still do loads, without permanently breaking much. Liberal use of read-only Python scripts with the set-uid flag set can extend this further.
    • Lots of Debian's written in scripts. Mostly Python or Sh, which are both good to learn and relatively easy to fiddle around in because they're text files. Showing the child IDLE will keep them occupied for hours. Make sure to show them help!
    • You can access all of the code. Simply press Up in pcmanfm a few times and you're in the root directory!
    • Source code is available. It'd be a good learning experience to be taught about compilers and go "Ooooh, that's what the programname.c files were!" (since the child will probably try, and fail, to run these files bearing similar names to runnable programs).
    • Almost all programs accept --help. While it's not as easy to discover as DOS's /? (perhaps a reason to favour DOS), if a child is told about --help they can work out how to use pretty much anything. Same with man and info.
    • You can set up backups with rsync, tar and cron. Backups. Backups a thousand times. You do not want a sad child who has just erased everything they can write to by trying out rm -rf / --no-preserve-root (or, at least, you don't want them to be sad for any longer than necessary to learn that lesson early, which in my experience is about 5 seconds). I recommend making backups to a remote machine every 10 minutes, and using tar's incremental backups feature to ensure that every version is saved.
      Note that I didn't say "make sure they can't delete all their files"; nothing should be off-limits. Plymouth shouldn't even run on startup, nor should the OS boot into startx immediately (though for a very young child you might want it to).
  • A teacher who knows everything and can be asked questions is useful. I would've liked this a lot. Unfortunately, no such teacher exists... but is that such a bad thing? You can show them how to find stuff out for themselves, if they're old enough! I tend to use DuckDuckGo, since it doesn't constantly advertise Chrome and YouTube at you in deceptive popups at the side. The child can ask to look something up, plug in the Ethernet cable (located elsewhere; hence the laptop), find the documentation page and unplug it again; if they get to the point where they need to look stuff up frequently (the Stack Overflow point) you can start teaching them like an adult. Until then, answer all their questions, and when they ask a big one you can teach it to them. Be interested in what they're doing, but don't give unsolicited lectures ("Do you want to know about X / how to do Y?" is good, but "X does blah blah blah" is not).
  • Code should have immediate effects. When you run the program, something should happen. Scratch is good for this, but a diet of Scratch and nothing else is not as effective as it should be. You want to train a polyglot.
  • A tutorial that uses good style, or no tutorial at all. I've used tutorials with good style and bad style, and learned languages without any tutorials (just a few example programs) and it's pretty tricky to unlearn bad style. You can get good style by osmosis, but that's much easier when you've got good style in the first place. I'm not sure where I learned the importance of style, so you'll have to figure that one out yourself.

To summarise:

  • Age: 2
    Use ScratchJr or similar. It has pretty buttons and you can make things move, and it gets you interested in programming.
  • Age: 4
    Use MIT Scratch (offline), and have an OS that can be pulled apart. Lots of the things that are done won't be directly programming-related (e.g. spending 20 minutes completely destroying the UI) but it's all learning things that you probably take for granted that you know (e.g. that multiple things can use the same value for font colour, or that pink and green are lovely colours for window titlebars). Have Python available.
  • Age: whenever they seem ready
    • Start to teach them "grown up" programming languages. Don't say something like "Scratch isn't a real programming language"; that's disheartening and false.
    • Introduce them to the Scratch website; it's a good programming community.
    • Start introducing more abstract programming techniques.
    • Once they've reached the "minimum knowledge" in both a single "grown up" programming language and in programming in general, show them Stack Overflow, the Font Of All Knowledge™. (Perhaps also Wikipedia, the Font Of All Knowledge™, but only if you don't mind them being very distracted for a few months.)
  • 5
    $\begingroup$ You have hit on something that needs to be shouted: much of what is available now as education is full of endless distraction. When I was 14, sitting at a PDP-11 terminal, there were no ads. $\endgroup$ – Scott Rowe Nov 11 '18 at 1:31
  • 3
    $\begingroup$ +1 for "The child needs to be curious." and another +1 for "The child needs to have something to tinker with." $\endgroup$ – RonJohn Nov 11 '18 at 22:11
  • 2
    $\begingroup$ @RonJohn I have no idea why people think they can teach a programmer more easily than an artist, but there we go. $\endgroup$ – wizzwizz4 Nov 11 '18 at 22:12
  • 2
    $\begingroup$ @wizzwizz4 because it's the hip thing, the STEM thing, the Bill Gates thing. But no one wants to admit that it's the Aspergers thing, too. $\endgroup$ – RonJohn Nov 11 '18 at 22:16
  • 2
    $\begingroup$ @Nelson I only found HELP when I was showing a friend "look, there's no help of any kind!" aand... there was. I felt pretty stupid! $\endgroup$ – wizzwizz4 Nov 12 '18 at 6:57


My parents sent me to programming courses when I was 7-9 years old or so, the first half of the 80s. Completely useless knowledge today, but that is not the worst part of it - the worst part of it is that at a time when I should have learned to interact with other humans I spent a lot of time in front of a computer. I also took the STEM way through school and university because of this. It wasn't until I was around 25 I realised that this was completely wrong for me and I would never have elected to go to these courses as a kid unless my parents had pushed me.

Programming is easy to learn, and probably will be even easier in 10-15 years when these kids have grown up. Kids don't need artificially more screen time or earlier introduction to computers than they will have anyway.

These kids are far better of if you play board games with them, take them on a walk in the forest, read a book for them, play some football, teach them to swim, play an instrument, visit a farm and interact with cows and pigs or something like that. And yes, it is mutually exclusive with programming.

If a 16-year-old wants to learn programming on her/his own initiative, fine but don't force young kids to live their parents' dreams.

Besides, recently there has been a lot of articles about how the Silicon Valley elite stops their children from spending time with their phones and computers. That should make you think.




and so on.

That includes programming. Just. Don't. Do. It.

  • 2
    $\begingroup$ +1. Thanks for the perspective and the links. $\endgroup$ – Buffy Nov 10 '18 at 16:29
  • 7
    $\begingroup$ This is actually a very persuasive answer. Thank you for the frame challenge, and welcome to Computer Science Educators. $\endgroup$ – Ben I. Nov 10 '18 at 17:05
  • 1
    $\begingroup$ Could you explain the concern a bit more? I mean, it sounds like your parents sent you to some programming classes from ages 7-to-9, and now as an adult, you've found yourself disinterested in it - I understand that part. But how do you get from having taken a few classes that you weren't interested in at a young age to the idea of complete social separation? I mean, that seems like a bit of a leap, so perhaps there's a bit more to the argument? $\endgroup$ – Nat Nov 11 '18 at 18:17
  • 2
    $\begingroup$ @Nat That's because the freedom of choice is there for you. If parents gave "choices" to their kids, and it is in the form of "A, B, C, but you must choose one", then the choice is stacked and not valid, because it can be none of them, or all of them, or even D, E, F, etc... Parents themselves need to know how to teach children how to choose. Many do not do this properly. $\endgroup$ – Nelson Nov 12 '18 at 6:15
  • 1
    $\begingroup$ Silicon valley execs keep their kids away from computers as an overreaction to the fact that modern electronic devices (especially games) work really hard to give you a profound sense of accomplishment without you actually accomplishing anything of significance. This is addictive and distracting and a bad habit to fall into, much like watching sports instead of playing them yourself. To be an excellent programmer though one must learn to think analytically, and that is more effective when started younger. You can teach it without computers, but taking apart clocks and cars gets expensive. $\endgroup$ – Perkins Nov 12 '18 at 22:50

I've been teaching kids (7~13) for the last four years or so, languages including Scratch, Python, Java, and C++. Surprisingly, kids can understand these languages even at a young age.

The best time is about 7 ~ 12, starting with Scratch. The minimum age would be around 7 because, even for a beginner, many examples and practices will involve some sort of creating a game or app that requires basic math or science knowledge such as x, y coordinate, calculating numbers, etc. Also, in general, screen time is harmful, in my opinion, especially for very young kids. Spending several months to a year on Scratch, and then teach them how to type fast using some typing game websites. Then, you may teach them Python first, and then JavaScript when they become 10 to 12 years old.

Basic knowledge in math such as arithmetics and better yet the concept of variables and functions in algebra can be very helpful when kids gain some experience with programming.

  • 1
    $\begingroup$ Ever tried Haskell? I heard it's actually much easier to understand intuitively. I have 20 years of programming to re-work so I don't understand it yet... $\endgroup$ – Nelson Nov 12 '18 at 6:16
  • $\begingroup$ Effort that requires you to learn new things is a great way to learn new things. Do you think I learned to read because it was the right thing to do? Of course not - I learned to read so that I could read all the awesome stuff in books (and computers)! Math can be interesting on its own, but you can learn it just as easily if you need it to solve a problem, even if you don't have a liking of math. Don't underestimate the power of genuine curiosity :) $\endgroup$ – Luaan Nov 13 '18 at 12:45

I started with BASIC on the ZX80 at 8 (self taught), I graduated to Z80 machine code at about 10. So, I'd guess js would probably be fine from 10+

  • 5
    $\begingroup$ Thank you for sharing your experiance! Would you mind editing to add some explanation as to why you think learning at age 10 worked well for you and why you think others would be similar? $\endgroup$ – thesecretmaster Nov 9 '18 at 15:37
  • 1
    $\begingroup$ @thesecretmaster It's been that way for an entire generation of people using personal computers before Microsoft and Apple. It's worked for many others. And another generation with TI-BASIC. :P $\endgroup$ – forest Nov 10 '18 at 9:16
  • $\begingroup$ Not sure what you want as explanantion. It was all nearly 40 years ago. I guess I mean that I was very capable of working with some pretty abstract concepts by the age of 10. $\endgroup$ – kpollock Nov 12 '18 at 15:28
  • $\begingroup$ @kpollock I don't think you've really explained why you think that most 10+ year olds will be able to learn JS. I don't see the logical steps that say "I learned these things at age 10 therefore everyone can learn these things at age 10" and "These things are analogous to JS." $\endgroup$ – thesecretmaster Nov 12 '18 at 15:43
  • $\begingroup$ I said "guess", and "probably". I don't consider I was unusually bright or advanced (fairly bright and interested), so I therefore have a gut feeling many kids would also be Ok. And you are right, I did not elaborate. People familar with both js and machine code will (I hope) get my meaning, others not. If my answer is generally not seen as useful, I have no objections to it being deleted. $\endgroup$ – kpollock Nov 12 '18 at 16:00

Having taught small groups of children HTML, CSS, and JS as holiday programs, my thoughts are:

  • be aware that many parents send their kids to classes for one or both of these reasons:
    • to babysit them
    • to "enrich" the children in something the children are not really interested in.
  • If young students (< 12) are not interested, you can get them about as far as understanding that there are bits of the code they can change that will change messages or backgrounds. If older students are not interested, they will get more out of it, but you will have to focus more on "making it cool" than understanding concepts.
  • Whether or not there is a good level of interest, the children will at times be bored, tired, or some will be behind and others ahead. You need to have some easy and fun distractions/topic changes, or ways to keep the fast ones busy and look for signs that students are losing the ability to concentrate. At this point it is unlikely to re-invigorate them with some whiz-bang, they either need a break or have reached their limits for the day. (So you need activities they will enjoy that don't require concentration.)
  • In the 5-10 age range there is a mixed bag of typing skills. Some students are very slow or struggle to recognize special characters. (So, Scratch. Or GameFroot)
  • I would say that age is much less important than age range. If you have everything from 5 to 15-year-olds, you are not teaching them all the same thing, even if they are all doing the same activity. If the students are of a similar age, you can teach concepts appropriate for that age without trouble and be aware of who is falling behind.
  • Parents and children should be OK; the parents expect that the content is at a level the children will understand. But children and adults are not good, because the children slow things down so much. However 15+ is fine, and 12+ is probably OK, especially if they are interested.
  • $\begingroup$ There would definitely be adults, but I wouldn't like to limit it fort children, and I wouldn't like to babysit. That's why I was thinking of accepting 12 - X years with a parent, and from X onwards alone. Is it a good idea to have such mixed group and what would the age X be? $\endgroup$ – Ska Nov 10 '18 at 8:12
  • $\begingroup$ I agree with your thoughts about interest, concentration, etc. of younger children. When I was 18 and 19 I was a summer day camp counsellor of kids 6-13, the first year I did photography. Very motivated older students made box cameras, least motivated made one photogram and rushed back out of the darkroom, hopefully not ruining other kids stuff. They printed from negatives I brought, a "No Dogs Allowed" sign was strangely popular, they all wanted to make one. So, have a range of activities, and try not to spend all your time in a small dark room with lots of rowdy pre-teens. $\endgroup$ – Scott Rowe Nov 10 '18 at 13:00

You can start at 7 (maybe younger): I have taught this age. We used scratch (the language), it is well suited to this age, and older.

I have only taught a single student at a time, at this age. We coded next to each other, taking ideas from each other. e.g. I would add arrow key control, the student would copy that bit of code, I would ask “Can we do this for a second character?, How do we …?” We make good progress (In similar number of (but shorter) sessions): arrow keys, drawing, multi-sprites, mouse control, edge bounce, sprite detection, score, …


If you teach them problem-solving you will help them far more than if you teach them the syntax of any programming language. Those that know problem-solving generally won't be coming to such classes to learn syntax.

To have both kids and adults participate, I advise you to teach "physical programming" instead of stuff on the computer. It will be much easier to find a task interesting for both adults and kids no matter their age, and it will give even young child feeling he/she achieved something. Additionally, it is far more social than sitting in front of a computer - you could have everyone participate and "program" a single robot/car/... at the same time, or you could have pretty interesting competitions perhaps even with a small prize for the winner.

Now, when to start - I wouldn't teach younger than 3 simply to avoid liability if they end up eating blocks or whatever. But if you push that liability to parents, you can teach even younger ones. Primary school kids are old enough you could have a group without parents present.

To start as early as possible: Cubetto is a wooden robot that knows forward and rotate left/right (by 90 degrees). Plus a single function that can take 4 commands. It is a decent choice for the classroom as it is fairly sturdy. There are other alternatives with similar difficulty (say code-a-pillar is cute and cheaper, but it will break faster). Tasks mainly involve variations of "how will we get from our current position over there". Difficulty range is suitable from 2-7 or so, though you could create some "challenges" that wouldn't be trivial even for most parents.

Primary school, teenagers, nearly everyone: Lego. Nearly everyone has Lego bricks at home, many have technic bricks too, so having something that fits right in is great. Plus, the difficulty range available is pretty huge - it won't be trivial even for adults that know programming. You can start with about 6-year-old children here. Nearly endless options what to do, competitive challenges are organized for primary schools every year and you could steal some of their ideas and put a fresh spin on it (depending on whether you want to increase or decrease difficulty - depends on your group age and skill).

  • $\begingroup$ Have you done this with, say, six year olds, or are you speculating? I find the technic bricks to be pretty sophisticated. $\endgroup$ – Buffy Nov 10 '18 at 23:34

tl;dr- You probably shouldn't encourage youngsters to take your course if it's designed for adults. Adults who want to program need to learn about specific syntax and technologies that can be used today, while children are better off focusing on the abstract concepts.

Adults and children tend to have different learning needs

Adults who want to program need to know the specific syntax, technologies, tools, and environments that exist today. They need to know the quirks of different browsers (for JavaScript/HTML/CSS), the idioms of their chosen language, and the best practices for writing actual code.

Children should also learn about programming, but their learning goals will tend to be different. They have no need to know anything about today's web browsers, API's, idiomatic styles, etc., any more than a modern programmer needs to know about how to program an old-time computer with punch cards. It's useless information – or, worse, potentially harmful misinformation that they'll be worse off for having to unlearn later.

If a child's parents try to enroll them in your course, you might advise them that, while it's probably a good idea for their child to learn about programming, you're going to teach the details behind how to write programs for today's systems. By contrast, their child is more likely to benefit from a course that focuses on the concepts behind how computers work, without wasting the student's focus on modern implementation details.

There may be exceptions

Some younger students might actually want to learn modern implementation details. For example, there're kids out there who want to learn more for the same reasons adults do, such that they'll need to know the trivia behind present-day JavaScript/HTML/CSS even though that trivia is likely to be useless by the time they're an adult.

In those cases, you might need to consider allowing them in your course on a more logistical level. For example, are you prepared to handle a misbehaving child? Are there any laws about childcare that must be observed?

If you've got all of that covered, then you might choose to allow younger students into your course.

  • $\begingroup$ Interesting and true. I would need to teach both though, and no scratch, just JS, HTML, CSS. So from what age onwards are kids mixable with adults you think? 15? $\endgroup$ – Ska Nov 13 '18 at 11:29
  • $\begingroup$ @Ska Kinda hard to give an exact age. Some kids go off to college and are essentially mini-adults by age-10, while other people never reach adult-like maturity. We could probably take a reasonable guess at population-averages, but it seems unlikely that people inquiring about your class will represent a fair sampling of the population. So, it may have to be a case-by-case basis thing. $\endgroup$ – Nat Nov 14 '18 at 17:14

I am not sure if just a simple age number would suffice.

I think, for a child to be able to learn to program, the following requirements need to be met:

The child needs to be able to write simple English

For an English native speaker that means being able to write fluently. For a child that is learning English as a second language, that might be a lot later. When my father tried to teach me programming at the age of 10, my English was so poor that I struggled more having to memorize keywords than I did learning programming concepts. In the end, I gave up quickly. But when I tried it again at age 14, that was no problem anymore.

The child needs to grasp basic math

I think the association between maths and programming is overrated (being a great programmer does not necessitate being a great mathematician). That said, knowing the basics of maths (especially variables, calculations, and functions) is necessary or at least greatly helps to understand some basic programming concepts. While the specifics of mathematical variables and functions and their programming counterparts differ slightly, knowing their mathematical version helps a lot to understand these programming concepts. Also, if they are old enough to understand the mathematical concepts, they are old enough to understand simple programming concepts.

The child needs to be interested

Especially at a young age being interested in the topic is more important than anything. And by that, I don't only mean that the child is interested in the idea of programming, but that the child actually likes doing it. Children (same as many other people) might have misconceptions of what programming is. They might like the idea of whipping up another Minecraft in half an hour, but they might not stick with it as soon as they learn that programming entails hours of concentrated hard work only to make something that looks rather simple.

Another aspect of this is that many parents would like their kids to learn programming and send them to a programming course, even though the kids don't care for it at all. In such cases, it is almost impossible to teach them anything at all.

Abstract thought

Depending on what exactly you want to teach, some things might require some abstract thoughts abilities that are only developed during the development of the child. But firstly, the age where these abilities are developed varies wildly. Secondly, these abilities are rarely what limits a child from understanding programming.

As a side note: don't start with JS/HTTP/CSS. This might be a good start for an adult, but it is a terrible start for a child. There are just way too many dependencies that they need to learn before they can make something cool. In my work teaching youth programming I found, that to keep them motivated it is important that they learn to do something cool, something fun, and something that they can show off. I like to use Python. Within the first ten minutes or so I teach them about text input and output, ifs and variables. I don't go into details here, just do the very basics. Then I let them start on their own little text adventure game. After they built the first few scenes, I show them loops, to make a combat scene or something like that. Then I show them, that it is much easier to organize each scene into a function, that is called from another function. Then I show them how to use returns and the main loop to avoid a long call stack (each scene function now returns the next scene's function that is executed in the main loop). On the second day, I use a library like pygame to show them how to make a little graphical game, like a scrolling racing game. Again, skip specifics and only teach the minimum necessary. There is enough time for specifics later.

Just don't ever use the textbook approach with kids, where you basically go through a 500-page book and still are stuck in the command line having built nothing at all.


My minimum age would be 12-13ish.

I taught myself programming at the age of 13, on one of the first-gen 8bit home computers. I consider myself to have been the ultimate nerd back then. I slurped up every bit of information I found in books or magazines. So that's that.

My youngest child is 9 now, and quite the nerd as well - but for her, that still means games, Minecraft, etc. I daresay I have tried a little bit to encourage her exploring with Scratch etc., but hit little interest. Mainly because it is hard to motivate a 9yo finding a "domain" to program in - the joy in purely abstract stuff (like first data structures, control logic, etc.) is just not there for her, yet. She would be motivated by results (like, and I kid you not, "Daddy, I would like to program... can you show me how I can program my own Minecraft, next weekend"). But anything you can program today is by necessity so vastly inferior to even the simplest web game etc. they can play, that it's hard if they are not internally motivated.

For these ages, I found the Nintendo Labo series excellent, or websites like Pixel Papercraft, where they can combine child-adequate real-world skills (working with pen, paper, scissors, etc.) with "tech". I fully expect us to upgrade to something like Lego Mindstorm or whatever gadgets there will be around when she's about 12-13. And I may introduce her to some programming using Javascript or something else which leads to immediate results (don't, also, dismiss the IoT angle, i.e., Arduinos and the like - having lights blinking, etc. can be fulfilling as well; and their language is far simpler than any PC language with its plethora of libraries and special stuff going on).

There may obviously be exceptions, and it's harder in our case because she is only starting to learn English, so all the really good resources are closed to her yet. That may or may not be a factor you can alleviate if you roll your own course, obviously.


I like Scratch: It is a great start to learn programming. Children were taught programming in the company where I worked. The greatest successes was with 9→12 year old children. The younger ones did not show much interest. But did tasks well.


I think it really depends on the level you want (or are qualified) to teach at. There are programming books for toddlers. Code.org has courses for K-12. The additional challenge with using HTML/CSS/JavaScript is that you also have to teach some web development concepts. A standalone programming language like Python or Java might be better, depending on your goals and motivations.


Today kids have probably been computer-savvy with video games, smartphones, tablets, and other electronics from a young age. They might also have started to express an interest in learning how to code and program their own games. But, is this a good idea, and you should allow young kids to jump into coding.

Kids as young as 7 years of age can start coding and learning programming basics. In fact, coding for kids has gained popularity rapidly in recent years as the technology becomes increasingly part of everyday life. Kids who learn to code when they’re young can set themselves up for a lifetime of opportunities for success. In fact, many of the FunTech coding summer camps and term-time courses with involve programming, are focused on game development.

Since they can start grasping concepts from the age of 7. I recommend 7 years of age to be a good head start for both whether they learn alone or with their parent.


I think there is no fixed or right age to learn coding. It totally depends whether the child is really interested or curious to learn coding. Many schools & private institutions have incorporated coding in their core curriculum. Learn coding kids at a young age helps in developing their overall growth. It encourage critical thinking as well as problem solving skills among kids.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.