<p>My minimum age would be 12-13ish.</p>
<p>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.</p>
<p>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 &quot;domain&quot; 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 <em>results</em> (like, and I kid you not, &quot;Daddy, I would like to program... can you show me how I can program my own Minecraft, next weekend&quot;). 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.</p>
<p>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 &quot;tech&quot;. 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).</p>
<p>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.</p>

CC BY-SA 4.0
2018-11-12T23:16:42.523Z
2021-06-30T06:53:31.710Z
2021-06-30T06:53:31.710Z
AnoE
<p>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.</p>
<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2021-06-22T03:58:01.653Z
2021-06-22T03:58:01.653Z
Free Palestine
<p>I think it really depends on the level you want (or are qualified) to teach at. There are <a href="https://rads.stackoverflow.com/amzn/click/158089884X" rel="nofollow noreferrer">programming books for toddlers</a>. Code.org has <a href="https://studio.code.org/courses" rel="nofollow noreferrer">courses for K-12</a>. 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.</p>

CC BY-SA 4.0
2018-11-14T18:46:27.323Z
2018-11-14T18:46:27.323Z
Edwin Torres
<p>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 &amp; 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.</p>

CC BY-SA 4.0
2020-11-02T05:45:21.533Z
2021-06-22T14:42:56.750Z
2021-06-22T14:42:56.750Z
TechyKids
<p>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.</p>

CC BY-SA 4.0
2018-11-09T16:39:23.400Z
2018-11-10T14:36:26.467Z
2018-11-10T14:36:26.467Z
Bobby  Simon
<p>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 <a href="https://www.verywellmind.com/piagets-stages-of-cognitive-development-2795457" rel="noreferrer">Piaget</a> 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. </p>

<p>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. </p>

<p>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. </p>

<p>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. </p>

CC BY-SA 4.0
2018-11-09T14:37:20.807Z
I should've probably clarified that the language will be Javascript. So it will require a bit more 'discipline' than simply dragging boxes like Scratch. Should I then aim for 12+ and do 16 and younger only with a parent? I wouldn't like to play a role of a baby sitter for early teens.
Ska
CC BY-SA 4.0
2018-11-09T15:45:14.003Z
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.
Buffy
CC BY-SA 4.0
2018-11-10T00:58:12.630Z
@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.
chrylis -cautiouslyoptimistic-
CC BY-SA 4.0
2018-11-10T08:30:45.840Z
@chrylis JS is a requirement, as people who approached me wanting this course want to build websites and apps.
Ska
CC BY-SA 4.0
2018-11-11T15:38:43.733Z
12?  No way.  I was beginning to learn about programming and abstract concepts that underlie it at age 8!
Mason Wheeler
CC BY-SA 4.0
2018-11-11T15:41:07.193Z
@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.
Buffy
CC BY-SA 4.0
2018-11-11T19:51:51.537Z
@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.
David Mulder
CC BY-SA 4.0
2018-11-11T22:37:09.223Z
@DavidMulder, Actually, if you search for your quote, you wind up at wikipedia. If you find the relevant section there, and then go to the referenced articles, you find that Piaget holds up very well as applied to this conversation. The first link (an abstract only) seems to refute the quote and the second indicates that it applies only to simpler tasks. I still say that you should consider what Piaget has to say about development before you plunge in to something like this.
Buffy
CC BY-SA 4.0
2018-11-12T12:04:27.253Z
@MasonWheeler I think it depends on the concepts: I was learning BASIC from age 4 with the help of the Usborne programming books, writing DOS batch scripts a couple of years later, and dabbling with Pascal, but when I was 8 I tried learning C (from the famous book "The C Primer"); all was going well until pointers were introduced, and I just couldn't wrap my head around them at that age. I didn't revisit the concept until about 10 years later! :-)
Aaron F
CC BY-SA 4.0
2021-07-03T21:44:54.997Z
@chrylis-cautiouslyoptimistic- No doubt that JS is quirky, but Python and Ruby have no shortage of their own idiosyncrasies and frustration points as well, as does any language. Picking a first language based purely on safety is a mistake. JS needs to be considered in the context of what it's capable of: zero-installation, native graphics manipulation and interactivity make it a defensible choice over server-side languages. Teaching beginning coding is less about instilling best practices and more about engagement. [Coding Train](https://thecodingtrain.com/) illustrates the advantages of JS.
ggorlen
CC BY-SA 4.0
2018-11-09T12:28:33.050Z
2018-11-09T12:28:33.050Z
Buffy
<h2>The minimum age</h2>
<p>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.</p>
<p>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. 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 <code>sleep</code> command.</p>
<p>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:</p>
<ol>
<li><p>They must be comfortable typing (real typing, not hunt-and-peck typing).</p>
</li>
<li><p>They have to have a language that lets them <em>do</em> something, not just see &quot;Hello, World&quot;.</p>
</li>
<li><p>They need to enjoy it as a learning experience, not a chore.</p>
</li>
</ol>
<h2>The choice of language</h2>
<p>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).</p>
<p>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 <em>one</em> 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!</p>
<h2>Getting them interested</h2>
<p>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.</p>
<p>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 <em>immediate</em> results.</p>

CC BY-SA 4.0
2018-11-11T18:16:50.270Z
"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*.
Polygnome
CC BY-SA 4.0
2018-11-11T22:25:12.043Z
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`.)
wizzwizz4
CC BY-SA 4.0
2018-11-12T01:18:51.517Z
@Polygnome https://steve-yegge.blogspot.com/2008/09/programmings-dirtiest-little-secret.html
forest
CC BY-SA 4.0
2018-11-12T08:31:06.150Z
About how Python tends to enforce one way to do things: I agree that children like to come up with alternative solutions, but I also see that children like it (a lot!) when they know they've found "the" solution. You just have to love the face they make during the "a-ha" moment.
ChatterOne
CC BY-SA 4.0
2018-11-12T10:05:08.840Z
@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.
Polygnome
CC BY-SA 4.0
2018-11-12T10:30:47.823Z
@Polygnome The blogger is well known, and that article is even referenced on [Coding Horror](https://blog.codinghorror.com/we-are-typists-first-programmers-second/).
forest
CC BY-SA 4.0
2018-11-12T20:38:13.040Z
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.
Gábor
CC BY-SA 4.0
2018-11-13T12:35:53.447Z
@Polygnome So you don't write documentation? Specs? Stories? You don't communicate through IMs, seek/provide help on programming boards? Keep to-do lists, design decisions, abandoned decisions and reasons for them? I certainly don't spend a significant fraction of my work time typing *code*; most of the effort is on typing *other* things. "Slow typer" isn't a red flag because you can't push code fast enough. Don't fight the strawman. If you have a great programmer who's bad at typing, I suspect it's because he keeps notes in writing - that's fine, though somewhat harder to share/backup.
Luaan
CC BY-SA 4.0
2018-11-13T13:58:44.207Z
@Luaan Yes, I do write them all the time. but I also read them all the time. Again, I'm not saying you shouldn't learn to proper type - you should - but that its not the *most* important thing for a good programmer. I've seen people who can type very fast write an absolutely unintelligible mess because they simply were not able to communicate ideas properly. Good ability to express yourself, being clear and concise and being able to read & understand what is written are all imho more important then how fast you can type. Focus on the most important things, first. Touch typing comes later.
Polygnome
CC BY-SA 4.0
2018-11-13T13:59:39.213Z
Touch typing should come _first_, as a prerequisite to using a computer. Now it's true, a child isn't going to need to type as fast as a professional developer who submits bug reports, writes documentation, writes unit tests, etc., but being a confident and fluent typist is important for computer activities in general.
forest
CC BY-SA 4.0
2018-11-23T20:39:14.453Z
Not sure what the deal about typing is. After 4 decades plus, I still type with three and a half fingers, albeit at 40 wpm.
pojo-guy
CC BY-SA 4.0
2020-01-30T16:26:06.137Z
One only needs to be able to type faster than one can think, regardless of whether one is typing code or comments/specs/docs. If your bottleneck for writing technical specifications is your typing speed, you are not thinking enough about them; it takes time to consider what ways a reader might misinterpret something, and defend against those misinterpretations.
kaya3
CC BY-SA 4.0
2018-11-10T08:56:48.610Z
2022-11-02T02:05:07.767Z
2022-11-02T02:05:07.767Z
forest
<p>This is a much less useful answer than I wanted it to be, but I'm posting it in case it helps someone.</p>

<hr>

<p>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.)</p>

<hr>

<p>On a Windows 98 SE<sup>1</sup>, aged five or six<sup>2</sup> I was trying to open All Of The Things&trade; to see what would happen. I happened to right click <code>autoexec.bat</code>, 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!</p>

<p>It wasn't long<sup>3</sup> before I realised that you just needed the <code>.BAT</code> extension. All of the programs I'd written looked like this:</p>

<pre><code>@echo off
cls
echo Hello!
echo This is a secret message.
echo Press a key
pause &gt; NUL
</code></pre>

<p>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 <em>did</em> know that you could run <code>command /?</code>, so when I found another batch file with an <code>IF</code> command in it, my programs evolved to:</p>

<pre><code>@echo off
cls

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 &gt; secret.txt
edit secret.txt
</code></pre>

<p>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.)</p>

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

<p>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.<sup>4</sup> 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.)</p>

<p>Later, I learned JavaScript on Khan Academy, but got frustrated when I couldn't just copy the JavaScript into a <code>.js</code> 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.</p>

<p>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 <em>concept</em> of a compiler) aged 8. Though... the skills that allow me to quickly pick up new languages <em>now</em> 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.</p>

<hr>

<p><sup>1</sup>: 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).<br>
<sup>2</sup>: perhaps around the time I discovered the File Associations dialog and was disappointed that I couldn't make a <code>.wizzwizzfile</code> 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)<br>
<sup>3</sup>: at 30 minutes a day, maximum; permission had to be sought every time I wanted to use a laptop<br>
<sup>4</sup>: I remember noticing that XP supported multi-line <code>IF</code>, 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 <code>IF</code> line.</p>

<hr>

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

<ul>
<li><strong>The child needs to be curious.</strong> 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.<br>
I recommend asking a parent / young-child-teacher how to get a child interested in something.</li>
<li><strong>The child needs to have something to tinker with.</strong> 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.<br>
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:

<ul>
<li><strong>YouTube is very good at distracting without educational value.</strong> 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.</li>
<li><strong>Manuals can be downloaded.</strong> 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. <code>man</code> 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).</li>
<li><strong>GRUB shouldn't be discovered early.</strong> 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. <em>But</em> eventually the child will get curious about what those pretty pictures are, and mash some keys.</li>
<li><strong>Debian is mostly stable.</strong> 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).</li>
<li><strong>Most things are text files.</strong> In Windows, if you manage to crack the shell-level dereferencing of <code>.lnk</code> files (not <code>.Ink</code> files) and open one directly in Notepad, you'll see a binary file with <code>T e x t   t h a t   l o o k s   l i k e   t h i s</code> 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.</li>
<li><strong>Debian's used in real life.</strong> 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 <em>me</em> well multiple times a week, is a lot less useful) and its warning messages are scary. Debian's are scary too, but not <em>quite</em> as scary and only when you've used <code>sudo</code> to mess something up. Which brings me to the next point:</li>
<li><strong>Non-elevated users can still do loads, without permanently breaking much.</strong> Liberal use of read-only Python scripts with the set-uid flag set can extend this further.</li>
<li><strong>Lots of Debian's written in scripts.</strong> 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 <code>help</code>!</li>
<li><strong>You can access all of the code.</strong> Simply press Up in pcmanfm a few times and you're in the root directory!</li>
<li><strong>Source code is available.</strong> It'd be a good learning experience to be taught about compilers and go "Ooooh, <em>that</em>'s what the <code>programname.c</code> files were!" (since the child will probably try, and fail, to run these files bearing similar names to runnable programs).</li>
<li><strong>Almost all programs accept <code>--help</code>.</strong> While it's not as easy to discover as DOS's <code>/?</code> (perhaps a reason to favour DOS), if a child is told about <code>--help</code> they can work out how to use pretty much anything. Same with <code>man</code> and <code>info</code>.</li>
<li><strong>You can set up backups with <code>rsync</code>, <code>tar</code> and <code>cron</code>.</strong> Backups. Backups a thousand times. You do <em>not</em> want a sad child who has just erased everything they can write to by trying out <code>rm -rf / --no-preserve-root</code> (or, at least, you don't want them to be sad for any longer than necessary to learn that lesson <em>early</em>, which in my experience is about 5 seconds). I recommend making backups to a remote machine every 10 minutes, and using <code>tar</code>'s incremental backups feature to ensure that every version is saved.<br>
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 <code>startx</code> immediately (though for a very young child you might want it to).</li>
</ul></li>
<li><strong>A teacher who knows everything and can be asked questions is useful.</strong> 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 <a href="https://start.duckduckgo.com/" rel="noreferrer">DuckDuckGo</a>, 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 <em>need</em> 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).</li>
<li><strong>Code should have immediate effects.</strong> 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.</li>
<li><strong>A tutorial that uses good style, or no tutorial at all.</strong> 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.</li>
</ul>

<hr>

<p>To summarise:</p>

<ul>
<li>Age: 2<br>
Use ScratchJr or similar. It has pretty buttons and you can make things move, and it gets you interested in programming.</li>
<li>Age: 4<br>
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.</li>
<li>Age: whenever they seem ready  

<ul>
<li>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.</li>
<li>Introduce them to the Scratch website; it's a good programming community.</li>
<li>Start introducing more abstract programming techniques.</li>
<li>Once they've reached the "minimum knowledge" in both a single "grown up" programming language <em>and</em> in programming in general, show them Stack Overflow, the Font Of All Knowledge&trade;. (Perhaps also Wikipedia, the Font Of <em>All</em> Knowledge&trade;, but only if you don't mind them being <a href="https://www.xkcd.com/214/" rel="noreferrer">very distracted</a> for a few months.)</li>
</ul></li>
</ul>

CC BY-SA 4.0
2018-11-09T22:20:16.307Z
Despite going through a similar learning process myself, I think the majority of students would be intimidated by that sort of thing. A lot of what you mention is what I'd try with a student who is *really* keen. Also, while reading your post, I keep thinking Raspberry Pi, Raspberry Pi, Raspberry Pi....
Artelius
CC BY-SA 4.0
2018-11-10T08:19:17.113Z
@Artelius I wasn't the only one then! I've actually got a laptop built around a Raspberry Pi, though since it's running Raspbian it's not too stable.
wizzwizz4
CC BY-SA 4.0
2018-11-11T01:31:42.127Z
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.
Scott Rowe
CC BY-SA 4.0
2018-11-11T05:56:00.343Z
Stability is uncertain, but there is also an educational spin of Debian. [Debian Edu/Skolelinux](https://www.debian.org/News/2017/20170618) worth looking at if the Linux/Debian thread is followed.
Gypsy Spellweaver
CC BY-SA 4.0
2018-11-11T22:11:51.490Z
+1 for "The child needs to be curious." and another +1 for "The child needs to have something to tinker with."
RonJohn
CC BY-SA 4.0
2018-11-11T22:12:44.150Z
@RonJohn I have no idea why people think they can teach a programmer more easily than an artist, but there we go.
wizzwizz4
CC BY-SA 4.0
2018-11-11T22:16:38.667Z
@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**.
RonJohn
CC BY-SA 4.0
2018-11-12T06:11:49.973Z
It's a shame you didn't type the word HELP.  Back then, the help file actually teaches you a LOT!  It's around Windows XP that they removed actual respect of the users and treated them like morons.
Nelson
CC BY-SA 4.0
2018-11-12T06:57:57.400Z
@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!
wizzwizz4
CC BY-SA 4.0
2018-11-12T19:06:09.673Z
Reminded me a lot of myself when I first discovered Linux. I was then a fan of Arch Linux because of its learning potential. As a parent now, I appreciate this answer (particularly the bullet points) to remind me how I could introduce my kids to computers and coding.
Heather
CC BY-SA 4.0
2019-08-19T22:40:04.333Z
`GRUB shouldn't be discovered early`
I've seen a 5 years old kid that got bored in GRUB, got into console mode by hitting some random keys and kept typing there for another 15 minutes. She came back for more many times since then :-)
Maciej Łoziński
CC BY-SA 4.0
2018-11-09T21:10:31.507Z
2018-11-11T22:45:00.337Z
2018-11-11T22:45:00.337Z
wizzwizz4
<p>Never.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p><a href="https://www.businessinsider.com/silicon-valley-parents-raising-their-kids-tech-free-red-flag-2018-2?r=US&amp;IR=T&amp;IR=T" rel="nofollow noreferrer">https://www.businessinsider.com/silicon-valley-parents-raising-their-kids-tech-free-red-flag-2018-2?r=US&amp;IR=T&amp;IR=T</a></p>
<p><a href="https://www.theguardian.com/technology/2015/may/23/screen-time-v-play-time-what-tech-leaders-wont-let-their-own-kids-do" rel="nofollow noreferrer">https://www.theguardian.com/technology/2015/may/23/screen-time-v-play-time-what-tech-leaders-wont-let-their-own-kids-do</a></p>
<p><a href="https://www.thriveglobal.com/stories/silicon-valley-execs-are-wary-of-the-devices-they-created/" rel="nofollow noreferrer">https://www.thriveglobal.com/stories/silicon-valley-execs-are-wary-of-the-devices-they-created/</a></p>
<p>and so on.</p>
<p>That includes programming. Just. Don't. Do. It.</p>

CC BY-SA 4.0
2018-11-10T16:29:08.253Z
+1. Thanks for the perspective and the links.
Buffy
CC BY-SA 4.0
2018-11-10T17:05:11.780Z
This is actually a very persuasive answer. Thank you for the frame challenge, and welcome to [cseducators.se].
Ben I.
CC BY-SA 4.0
2018-11-11T18:17:35.123Z
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?
Nat
CC BY-SA 4.0
2018-11-11T19:52:32.707Z
@Nat Children frequently inherit their parents interests, it might be sports, religion or professional career. So, they spend a lot of time doing something they might not be interested in themselves when they grow up and it will take a long time to realise that problem. The brain isn't fully developed until you are around 25 years old. Incidentally (but anecdotally), in my experience it is around 25 people realise they are not religious or don't want to work with what they study at school/university - they just did it because their parents steered them onto that path.
d-b
CC BY-SA 4.0
2018-11-11T20:07:20.397Z
@d-b Huh, that's interesting.  My parents insisted on mass exposure to all sorts of things, but left me to choose my own path.  I guess that I never personally felt limited by anything that I was exposed to; I mean, I ended up not caring for a lot of different things, and other things I liked but not enough to pursue.  So from this perspective, I guess I found it hard to understand how exposure to something could be taken as limiting.  I suppose that the trick might be to ensure that children have plenty of options and freedom, such that they make the important choices.
Nat
CC BY-SA 4.0
2018-11-12T06:15:06.743Z
@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.
Nelson
CC BY-SA 4.0
2018-11-12T22:50:57.320Z
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.
Perkins
CC BY-SA 4.0
2018-11-10T16:22:36.087Z
2021-07-16T03:42:34.253Z
2021-07-16T03:42:34.253Z
d-b
<p>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.</p>
<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2018-11-12T06:16:40.490Z
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...
Nelson
CC BY-SA 4.0
2018-11-13T12:45:48.993Z
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 :)
Luaan
CC BY-SA 4.0
2018-11-09T19:53:51.127Z
2021-07-16T03:40:24.830Z
2021-07-16T03:40:24.830Z
Jason Huh
<p>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+</p>

CC BY-SA 4.0
2018-11-09T15:37:08.407Z
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?
thesecretmaster
CC BY-SA 4.0
2018-11-10T09:16:04.657Z
@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
forest
CC BY-SA 4.0
2018-11-12T15:28:33.860Z
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.
kpollock
CC BY-SA 4.0
2018-11-12T15:43:25.523Z
@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."
thesecretmaster
CC BY-SA 4.0
2018-11-12T16:00:52.237Z
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.
kpollock
CC BY-SA 4.0
2018-11-12T16:58:40.117Z
I'm another one who started BASIC at 8 (with help - a maths homework puzzle involving palindromic numbers) and by 10 was writing my own simple stuff in another flavour of basic.  I ended up in physics, doing lots of scripting and having written a little production code. Another anecdata point to suggets this is a reasonable age.  You needed (pre-internet) a certain level of reading compression that a reasonably bright kid should have by that age
Chris H
CC BY-SA 4.0
2018-11-09T14:53:59.690Z
2018-11-09T14:53:59.690Z
kpollock
<p>Having taught small groups of children <code>HTML</code>, <code>CSS</code>, and <code>JS</code> as holiday programs, my thoughts are:</p>
<ul>
<li>be aware that many parents send their kids to classes for one or both of these reasons:
<ul>
<li>to babysit them</li>
<li>to &quot;enrich&quot; the children in something the children are not really interested in.</li>
</ul>
</li>
<li>If young students (&lt; 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 &quot;making it cool&quot; than understanding concepts.</li>
<li>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.)</li>
<li>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 <a href="http://make.gamefroot.com/" rel="nofollow noreferrer">GameFroot</a>)</li>
<li>I would say that age is much less important than <em>age range</em>. If you have everything from 5 to 15-year-olds, you <strong>are not teaching them all the same thing, even if they are all doing the same activity</strong>. 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.</li>
<li>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.</li>
</ul>

CC BY-SA 4.0
2018-11-10T08:12:42.313Z
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?
Ska
CC BY-SA 4.0
2018-11-10T13:00:25.180Z
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.
Scott Rowe
CC BY-SA 4.0
2018-11-09T22:11:50.657Z
2021-07-15T15:23:21.120Z
2021-07-15T15:23:21.120Z
Artelius
<p>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.</p>

<p>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, …</p>

CC BY-SA 4.0
2018-11-09T11:03:02.010Z
2018-11-09T11:03:02.010Z
ctrl-alt-delor
<p>I am not sure if just a simple age number would suffice.</p>
<p>I think, for a child to be able to learn to program, the following requirements need to be met:</p>
<h2 id="the-child-needs-to-be-able-to-write-simple-english-ehk3">The child needs to be able to write simple English</h2>
<p>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.</p>
<h2 id="the-child-needs-to-grasp-basic-math-iwp3">The child needs to grasp basic math</h2>
<p>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.</p>
<h2 id="the-child-needs-to-be-interested-wm78">The child needs to be interested</h2>
<p>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.</p>
<p>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.</p>
<h2 id="abstract-thought-7u09">Abstract thought</h2>
<p>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.</p>
<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2018-11-13T17:12:25.333Z
2021-07-15T15:22:50.323Z
2021-07-15T15:22:50.323Z
Dakkaron
<p><strong><em>tl;dr</em>-</strong>  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.</p>
<hr />
<h3>Adults and children tend to have different learning needs</h3>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<h3>There may be exceptions</h3>
<p>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.</p>
<p>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?</p>
<p>If you've got all of that covered, then you might choose to allow younger students into your course.</p>

CC BY-SA 4.0
2018-11-13T11:29:52.557Z
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?
Ska
CC BY-SA 4.0
2018-11-14T17:14:25.450Z
@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.
Nat
CC BY-SA 4.0
2018-11-11T22:14:41.560Z
2018-11-11T22:14:41.560Z
2020-06-18T08:36:57.023Z
Nat
<p>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.</p>
<p>To have both kids and adults participate, I advise you to teach &quot;physical programming&quot; 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 &quot;program&quot; a single robot/car/... at the same time, or you could have pretty interesting competitions perhaps even with a small prize for the winner.</p>
<p>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.</p>
<p>To start as early as possible: Cubetto is a wooden robot that knows <code>forward</code> and <code>rotate left</code>/<code>right</code> (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 &quot;how will we get from our current position over there&quot;. Difficulty range is suitable from 2-7 or so, though you could create some &quot;challenges&quot; that wouldn't be trivial even for most parents.</p>
<p>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).</p>

CC BY-SA 4.0
2018-11-10T23:34:55.067Z
Have you done this with, say, six year olds, or are you speculating? I find the technic bricks to be pretty sophisticated.
Buffy
CC BY-SA 4.0
2018-11-10T23:27:21.847Z
2021-07-16T03:38:13.637Z
2021-07-16T03:38:13.637Z
Zizy
<p>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). </p>

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

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

CC BY-SA 4.0
2018-11-09T11:03:23.983Z
This seems like a good idea.
ctrl-alt-delor
CC BY-SA 4.0
2018-11-09T11:04:13.537Z
Why tag as classroom-management?
ctrl-alt-delor
CC BY-SA 4.0
2018-11-12T15:35:59.980Z
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.
thesecretmaster
CC BY-SA 4.0
2018-11-13T15:18:45.310Z
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?
Mawg
CC BY-SA 4.0
2020-11-20T01:38:24.330Z
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.
Patronics
<programming>
What is good age to start learning programming?
# What is good age to start learning programming?

(Asked by: username_0 on 2018-11-09)

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?

**Tags:** programming

> **Comments:**
> **username_1**: This seems like a good idea.  
> **username_1**: Why tag as classroom-management?  
> **username_2**: 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.  
> **username_3**: 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?  
> **username_4**: 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.  

---

## 16 answers

### Answer by username_10 on 2018-11-09. Score: 44

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](https://www.verywellmind.com/piagets-stages-of-cognitive-development-2795457) 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.

> **Comments:**
> **username_0**: I should've probably clarified that the language will be Javascript. So it will require a bit more 'discipline' than simply dragging boxes like Scratch. Should I then aim for 12+ and do 16 and younger only with a parent? I wouldn't like to play a role of a baby sitter for early teens.  
> **username_10**: 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.  
> **username_11**: @username_0 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.  
> **username_0**: @chrylis JS is a requirement, as people who approached me wanting this course want to build websites and apps.  
> **username_12**: 12?  No way.  I was beginning to learn about programming and abstract concepts that underlie it at age 8!  
> **username_10**: @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.  
> **username_13**: @username_10 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.  
> **username_10**: @DavidMulder, Actually, if you search for your quote, you wind up at wikipedia. If you find the relevant section there, and then go to the referenced articles, you find that Piaget holds up very well as applied to this conversation. The first link (an abstract only) seems to refute the quote and the second indicates that it applies only to simpler tasks. I still say that you should consider what Piaget has to say about development before you plunge in to something like this.  
> **username_14**: @MasonWheeler I think it depends on the concepts: I was learning BASIC from age 4 with the help of the Usborne programming books, writing DOS batch scripts a couple of years later, and dabbling with Pascal, but when I was 8 I tried learning C (from the famous book "The C Primer"); all was going well until pointers were introduced, and I just couldn't wrap my head around them at that age. I didn't revisit the concept until about 10 years later! :-)  
> **username_15**: @chrylis-cautiouslyoptimistic- No doubt that JS is quirky, but Python and Ruby have no shortage of their own idiosyncrasies and frustration points as well, as does any language. Picking a first language based purely on safety is a mistake. JS needs to be considered in the context of what it's capable of: zero-installation, native graphics manipulation and interactivity make it a defensible choice over server-side languages. Teaching beginning coding is less about instilling best practices and more about engagement. [Coding Train](https://thecodingtrain.com/) illustrates the advantages of JS.  

---

### Answer by username_16 on 2018-11-10. Score: 23

## 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. 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.

> **Comments:**
> **username_17**: "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*.  
> **username_18**: 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`.)  
> **username_16**: @username_17 https://steve-yegge.blogspot.com/2008/09/programmings-dirtiest-little-secret.html  
> **username_19**: About how Python tends to enforce one way to do things: I agree that children like to come up with alternative solutions, but I also see that children like it (a lot!) when they know they've found "the" solution. You just have to love the face they make during the "a-ha" moment.  
> **username_17**: @username_16 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.  
> **username_16**: @username_17 The blogger is well known, and that article is even referenced on [Coding Horror](https://blog.codinghorror.com/we-are-typists-first-programmers-second/).  
> **username_20**: 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.  
> **username_21**: @username_17 So you don't write documentation? Specs? Stories? You don't communicate through IMs, seek/provide help on programming boards? Keep to-do lists, design decisions, abandoned decisions and reasons for them? I certainly don't spend a significant fraction of my work time typing *code*; most of the effort is on typing *other* things. "Slow typer" isn't a red flag because you can't push code fast enough. Don't fight the strawman. If you have a great programmer who's bad at typing, I suspect it's because he keeps notes in writing - that's fine, though somewhat harder to share/backup.  
> **username_17**: @username_21 Yes, I do write them all the time. but I also read them all the time. Again, I'm not saying you shouldn't learn to proper type - you should - but that its not the *most* important thing for a good programmer. I've seen people who can type very fast write an absolutely unintelligible mess because they simply were not able to communicate ideas properly. Good ability to express yourself, being clear and concise and being able to read & understand what is written are all imho more important then how fast you can type. Focus on the most important things, first. Touch typing comes later.  
> **username_16**: Touch typing should come _first_, as a prerequisite to using a computer. Now it's true, a child isn't going to need to type as fast as a professional developer who submits bug reports, writes documentation, writes unit tests, etc., but being a confident and fluent typist is important for computer activities in general.  
> **username_22**: Not sure what the deal about typing is. After 4 decades plus, I still type with three and a half fingers, albeit at 40 wpm.  
> **username_23**: One only needs to be able to type faster than one can think, regardless of whether one is typing code or comments/specs/docs. If your bottleneck for writing technical specifications is your typing speed, you are not thinking enough about them; it takes time to consider what ways a reader might misinterpret something, and defend against those misinterpretations.  

---

### Answer by username_18 on 2018-11-09. Score: 19

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
cls
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
cls

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.)

> **Comments:**
> **username_24**: Despite going through a similar learning process myself, I think the majority of students would be intimidated by that sort of thing. A lot of what you mention is what I'd try with a student who is *really* keen. Also, while reading your post, I keep thinking Raspberry Pi, Raspberry Pi, Raspberry Pi....  
> **username_18**: @username_24 I wasn't the only one then! I've actually got a laptop built around a Raspberry Pi, though since it's running Raspbian it's not too stable.  
> **username_25**: 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.  
> **username_26**: Stability is uncertain, but there is also an educational spin of Debian. [Debian Edu/Skolelinux](https://www.debian.org/News/2017/20170618) worth looking at if the Linux/Debian thread is followed.  
> **username_27**: +1 for "The child needs to be curious." and another +1 for "The child needs to have something to tinker with."  
> **username_18**: @username_27 I have no idea why people think they can teach a programmer more easily than an artist, but there we go.  
> **username_27**: @username_18 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**.  
> **username_28**: It's a shame you didn't type the word HELP.  Back then, the help file actually teaches you a LOT!  It's around Windows XP that they removed actual respect of the users and treated them like morons.  
> **username_18**: @username_28 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!  
> **username_29**: Reminded me a lot of myself when I first discovered Linux. I was then a fan of Arch Linux because of its learning potential. As a parent now, I appreciate this answer (particularly the bullet points) to remind me how I could introduce my kids to computers and coding.  
> **username_30**: `GRUB shouldn't be discovered early` I've seen a 5 years old kid that got bored in GRUB, got into console mode by hitting some random keys and kept typing there for another 15 minutes. She came back for more many times since then :-)  

---

### Answer by username_31 on 2018-11-10. Score: 15

Never.

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 username_16, 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.

<https://www.businessinsider.com/silicon-valley-parents-raising-their-kids-tech-free-red-flag-2018-2?r=US&IR=T&IR=T>

<https://www.theguardian.com/technology/2015/may/23/screen-time-v-play-time-what-tech-leaders-wont-let-their-own-kids-do>

<https://www.thriveglobal.com/stories/silicon-valley-execs-are-wary-of-the-devices-they-created/>

and so on.

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

> **Comments:**
> **username_10**: +1. Thanks for the perspective and the links.  
> **username_32**: This is actually a very persuasive answer. Thank you for the frame challenge, and welcome to [cseducators.se].  
> **username_33**: 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?  
> **username_31**: @username_33 Children frequently inherit their parents interests, it might be sports, religion or professional career. So, they spend a lot of time doing something they might not be interested in themselves when they grow up and it will take a long time to realise that problem. The brain isn't fully developed until you are around 25 years old. Incidentally (but anecdotally), in my experience it is around 25 people realise they are not religious or don't want to work with what they study at school/university - they just did it because their parents steered them onto that path.  
> **username_33**: @username_31 Huh, that's interesting.  My parents insisted on mass exposure to all sorts of things, but left me to choose my own path.  I guess that I never personally felt limited by anything that I was exposed to; I mean, I ended up not caring for a lot of different things, and other things I liked but not enough to pursue.  So from this perspective, I guess I found it hard to understand how exposure to something could be taken as limiting.  I suppose that the trick might be to ensure that children have plenty of options and freedom, such that they make the important choices.  
> **username_28**: @username_33 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.  
> **username_34**: 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.  

---

### Answer by username_35 on 2018-11-09. Score: 6

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.

> **Comments:**
> **username_28**: 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...  
> **username_21**: 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 :)  

---

### Answer by username_36 on 2018-11-09. Score: 5

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+

> **Comments:**
> **username_2**: 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?  
> **username_16**: @username_2 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  
> **username_36**: 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.  
> **username_2**: @username_36 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."  
> **username_36**: 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.  
> **username_37**: I'm another one who started BASIC at 8 (with help - a maths homework puzzle involving palindromic numbers) and by 10 was writing my own simple stuff in another flavour of basic.  I ended up in physics, doing lots of scripting and having written a little production code. Another anecdata point to suggets this is a reasonable age.  You needed (pre-internet) a certain level of reading compression that a reasonably bright kid should have by that age  

---

### Answer by username_24 on 2018-11-09. Score: 5

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](http://make.gamefroot.com/))
* 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.

> **Comments:**
> **username_0**: 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?  
> **username_25**: 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.  

---

### Answer by username_1 on 2018-11-09. Score: 4

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, …


---

### Answer by username_39 on 2018-11-10. Score: 4

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).

> **Comments:**
> **username_10**: Have you done this with, say, six year olds, or are you speculating? I find the technic bricks to be pretty sophisticated.  

---

### Answer by username_38 on 2018-11-13. Score: 3

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.


---

### Answer by username_33 on 2018-11-11. Score: 3

***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.

> **Comments:**
> **username_0**: 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?  
> **username_33**: @username_0 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.  

---

### Answer by username_5 on 2018-11-12. Score: 2

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.


---

### Answer by username_6 on 2021-06-22. Score: 0

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.


---

### Answer by username_7 on 2018-11-14. Score: 0

I think it really depends on the level you want (or are qualified) to teach at. There are [programming books for toddlers](https://rads.stackoverflow.com/amzn/click/158089884X). Code.org has [courses for K-12](https://studio.code.org/courses). 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.


---

### Answer by username_8 on 2020-11-02. Score: 0

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.


---

### Answer by username_9 on 2018-11-09. Score: 0

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.


---

