98 comments

[ 3.4 ms ] story [ 119 ms ] thread
Let's not forget that it was not rare that kids learned Assembly in the 1980s.
Also, let's not forget that some more fortunate cough John Carmack's cough kids are exposed to lisp in this day and age.

https://goo.gl/Fy4CSa

...6502 instruction set and things like undocumented Z80 instructions can be fully memorised as a child, even if some concepts, e.g. a stack, strange maths, comes later. If only I could remember syntax so well now.
Z80 assembly was the first 'real' language I learned as a kid (I did some basic GWBASIC but never got far with it). I wasn't very good at it, but I did write some programs that did what they were supposed to do.
Good to know. I learned Applesoft BASIC when I was 8 (in 1988-89), then moved on to 6502 assembly around age 11 or 12. I copied a lot of assembly routines out of books, though. And for some reason I can't remember now, I especially struggled with the Apple ProDOS Machine Language Interface (MLI).

When I first expressed interest in learning to program at age 8, my mother told me that an 8-year-old couldn't learn to program. Fortunately, I found a way to begin learning without any involvement from my parents (our computer, an Apple IIGS, came with a disk that included an introductory lesson on BASIC). I guess she just assumed I couldn't learn at that young age because home computers were still relatively new, so kids hadn't had direct access to computers for very long, so people just didn't know yet what was possible or realistic.

I never did, but I often wonder if it was due more to a lack of exposure than anything else. Back then, one's exploration was somewhat limited to what resources the surrounding adults provided you with. And when none of those surrounding adults are "computer people" in a useful sense, you don't get exposed to all that much. The computer itself, and its supporting documentation, tended to just dangle BASIC in front of your face and little else.
There is no learning JavaScript. There is only the ability to use StackOverflow and Google Search. ;)
What programming language do you think is different from that?
Any language that was learned 15+ years ago.
One that has a very readable specification that fits on a single page and has been read by most people using the language. For example, https://golang.org/ref/spec.
> fits on a single page

That's ~88 A4 sheets when printed.

A single web page. My point stands, is there an equivalent page for JavaScript?
I think JavaScript developers know how to make single web pages.

http://www.ecma-international.org/ecma-262/7.0/

But you're just trolling (and for something mediocre in the first place, sit down, he said from his lofty perch), so you should stop.

Thanks, that's very helpful!

I'm not sure what would make you think I'm trolling, because I'm not. Go was the only language I genuinely knew had a spec on a single page, and I thought other languages don't do that because it's not feasible (and the reason Go can do it is because it's much simpler and has a lot less features).

Now it's interesting to be able to compare the size of the two specs.

(comment deleted)
Other languages don't do it? What do you think C99 is? Or C++14? They're not "a single page", because they're ratified standards and so they're books and so they're PDFs, but--more importantly, who cares? Who doesn't specify their language, if they specify their language, in a single document?

Heck, why does this surprise you in the first place? Why do you think it's called ECMAscript?

(comment deleted)
Everything. Including Brainfuck. JavaScript is a fking mess.
Are you serious? All imperative languages are the same. There are many different features, but in essence they're exactly equal.

I could argue that is much easier to write something functional in Go than it is to do the same in Javascript, because the compiler conducts you since the beginning and you can actually get around with Stack Overflow and Google.

Javascript requires a lot more experience, because it can fail in so many ways, it has callbacks everywhere etc.

Should have started him with Haskell so he would learned monads and functors right from the start with no mutable object baggage to trip him up. Maybe a few weeks of child level category theory first.
I really hope you are kidding, because this was the funniest comment I've read today and I already scanned Reddit :)
I would sit him through a few Leslie Lamport lectures on category theory, maybe just 10 hours worth of material. I think this would be enough to get him stared with Haskell.
Why Haskell, the kid should have started with Lisp.
Why lisp? Kid should have learned assembly, or better yet; pure math. Now he is corrupted already.
Why lisp ? Because you want to give him the best possible tool for computing and ruin his (possible) future career, where he will be forced to work with people that like java and/or javascript.

(Downvote me all you want... :P )

Why assembly? Give the kid a magnetic needle and he'll soon learn to flip his own bits.
Give the kid Emacs, the language doesn't matter :P
This "kid" here started Lisp at around 29. Some 18 years after starting programming, and well into a C++-based career. You can come around late.
I would need to write up a bunch of new analogies for Haskell. I only recently started to make sense of functional Javascript and it's changed the way I think about code. Haskell is definitely on my own list of things to learn.
I wonder if closures are easier to understand in languages with clearer (or tighter) scoping rules. I notice that the author doesn't have an analogy for scope on his article
Ok let me take a stab at it.

Variables are imagined as containers. Those variables/containers exist within a scope. Let's take an example where a room is the scope. That room is in an apartment, which is in turn in an apartment building, in a city and so on. Code whose scope is that room can access containers in that room, or in the open areas of the apartment (but not in other rooms without special arrangements being made), or in open areas of the building (but not in other apartments …) etc.

So code in my room can look inside a container in the hall, but not in a container in your room. And vice-versa.

A closure allows this special arrangement to look in another room. I can create a closure in my room. This is code that can access the containers in my room, but it has the special property that it acts like it is in my room even when it isn't. So I can give you this closure and you can run it in your room. When it's running in your room it can't access your containers (except as arguments) but it can still access the containers in my room.

My daughter is two. I'm looking forward to taking this journey with her

Kids should be outside playing and interacting with other kids, not coding.
Why not both ?
because coding can be unhealthily addictive.
Yeah, it might also lead to something called a "career".
like that's what you're supposed to be worried about at age 10. Ridiculous.
And some people just find it fun?

I remember making starcraft custom maps, using "programming", back when I was 10. I didn't care what programming was. I just wanted to do fun stuff with Starcraft!

So can exercise, eating, playing, and studying. Teaching kids moderation is also important.
God forbid kids learn a skill.

When I was 10-11 I loved making silly little programs in BASIC. I had fun, it was something I could play with my friends with (a lot of my time was spent in a silly "chat bot", and a "choose your own adventure" text game), and I'm almost certain it led to my career.

I did both and really enjoyed it at that age :) I can remember riding my BMX for hours, shooting air guns and then going home to code some BASIC or just playing random games.
Replace "coding" with "learning to play the piano." Do you still agree?
On what basis do you make such an unequivocal, authoritative proclamation?
Cool write-up. Programming is a great thing to learn as a kid.
This reads like the author really wants his kid to learn programming, and the article shows more interest from the parent than from the child.

That's obviously anecdotical but I'm very glad nobody steered me into programming. It was my private garden, and I enjoyed every single second of the freedom it gave me. Writing my Delphi programs was funnier to me than programming books.

I think my point here is that I'm not sure it is in the best interest of children to push them into our passions. Then again I'm not a parent, so my opinion doesn't hold much weight!

I found programming myself on the family computer. Although, I'm not quite sure how I found 'QBASIC.EXE' when all I had were Apple II and Commodore 64 BASIC books in the school library.

What I needed back then was someone to give direction and help. If I ever have children my plan would be to make them aware of programming, and if they try it, good for them. I'll just mentor them along the way.

I found programming myself on the family computer. Although, I'm not quite sure how I found 'QBASIC.EXE' when all I had were Apple II and Commodore 64 BASIC books in the school library.

What I needed back then was someone to give direction and help. If I ever have children my plan would be to make them aware of programming, and if they try it, good for them. I'll just mentor them along the way.

I will add to his anecdote with my own. I have been teaching my nieces (10 and 16) how to program and I approached it the same way. My 16 y/o niece was told Python was the way to go, but I resisted teaching her that. I'm an iOS developer that learned the 3 bears of web, JS/Ruby/Python, when I started teaching myself. While there were many things to appreciate about all three, the most useful to me was ability to open up a website and see its contents. To build 'hello world' in three smalls files and load into a browser without the internet (kind of a big deal when your niece loses the internet - and electricity - from time to time. Cause: poverty) is eye-opening at that age.

Showing someone you are passionate about something and teaching that - passion... THAT is the best thing you can do for a young mind. The worst outcome is that they are not interested long-term but harness what they learned from you into something else. The best outcome is that they love it and eclipse you at some point earlier in their own careers.

I'm not a parent either, but even if my nieces choose other fields (odds are they will), they will be better off for having some technical training before doing so: they will dig far deeper than what's required because they were trained to think that way. One of my nieces is an artist. She could draw better than I could as an adult at 12 and I had formal training in industrial design! Showing her that code is just a lower level of artistic expression is something I wish someone would have told me at her age. Doesn't matter to me if she goes into ID, UX, SD, or CG. I don't believe you can have too much directed exposure.

> "That's obviously anecdotical but I'm very glad nobody steered me into programming."

Same. When I was growing up, we had a Commodore 64 and a small collection of programming books. (For the youngens in the crowd: Back in the day, software would sometimes be distributed in print form and you had to type it all in). As I learned to read, I also learned to type code (starting around age 5 or so). Likely one of the first chapter books I really spent time with was the C64 manual: http://www.commodore.ca/commodore-manuals/commodore-64-users...

I also didn't know how to fix errors, so any time I made a mistake I would have to retype it all. By default, on a C64 you can just start typing a Basic program and then type RUN to run it. So you'd enter something like:

   10 POKE 53280,2
   20 POKE 53281,5
   30 PRINT "CHRISTMAS!"
Then type RUN and it would run the commands. In the case of the above code, it would set the border of the screen to red, the background to green, and print CHRISTMAS! on the screen.

> "I think my point here is that I'm not sure it is in the best interest of children to push them into our passions. Then again I'm not a parent, so my opinion doesn't hold much weight!"

I think this is correct. My son has spent a fair amount of type with the faux-programming stuff they have for kids these days (Tynker, code.org, etc) and has enjoyed it, but I've been struggling to find a way to transition him to something more real without it feeling forced.

If he has some homework that could be programmed away maybe suggest he automate it? I understand there would be concern that he wouldn't "really" learn whatever the underlying task was but I've always come away from an automation task with a much deeper understanding of the underlying problem than I got from just doing it repeatedly.
Author here. Thanks for the feedback.

My son's experience has generally been self-driven via Scratch. I introduced him to Scratch at around age 7 through CoderDojo and he really enjoyed it (I'm a big fan of Scratch for kids--it's the perfect balance of art, creativity and logic with programming concepts mixed in.

I introduced Python, then Javascript, after he asked me about what I do (I was excited that he actually asked, so I ordered the book). I'm more of a web designer/developer, not a software engineer, so I showed him to the tools I know (trying to keep things at his level) and set him on his way. The thought of being able to write his own video game keeps him motivated. He plays with the examples on phaser.io/examples and sees it as something he might be able to do after working through the lessons.

My biggest concern is pushing him into something that he doesn't want for himself. It should never feel like work. He likes the CodeSchool videos, jingles and exercises, so he does it. He got tired of the books, so he stopped. There are many long gaps, diversions and pivots, which is totally fine. If he just wants to play outside, build with Legos, read, watch a movie or do nothing, I don't bother him. Programming is not his job, it's just a skill that I think will be useful for him and is something I can actually help him with.

Side Note: I originally had a section in the post about how in the past it was more common to pass knowledge and skills down to your children in the form of trades (farming, sewing, blacksmithing, etc.) and is "computer programming" something worthy of passing down. I thought it digressed a bit too much, so I removed it.

Don't overthink it. Just introduce him to something basic. Hell, why not even BASIC hehe ;) I remember when I was 9, my father enrolled me into some "bootcamp", I don't know what it was called back then, but it was some comp programing class for kids, about 3 hours a day for 2 weeks. I remember a teacher, she would just write little BASIC programs on the blackboard and we would just copy them into QBASIC. I remember that I understood very little and the other kids weren't interested much too, we were just eagerly waiting for recess, so we could play Prince of Persia 1 for 15 minutes.At the end of this BASIC "bootcamp", I didn't even touch programing again, I just went home and continued with my mastery of pp and prehistoric 1 & 2 games. But it looks like it planted a seed in my head, because in high school i started wondering what we did 5 years ago in those classes and I somehow found a book on basic and now here I am, writing GOTO statements for profit ;) Just kidding on that last part :) The moral of the story is - Kids can also develop interest much later from the time of exposure to new things.
Yes, BASIC was all the rage, 30 years ago. Today everything is Web and Cloud. I liked computers because I could make them do things which were cool then. Now I would probably want to do things which are cool now.

As long as the kid is fine with JS I see no problem. If GOTOs haven't rotten our minds (or have they? omg!) maybe NaNNaNNaN Batman! won't mess up his...

theres nothing wrong giving your kid motivation. If your kid wants something theres nothing wrong pushing him in the right direction. Both inner and outer motivation works equally well.
Your point is good, parent or not. That said, sometimes it's... hard. My 10-year-old son recently decided he was going to REALLY learn how to program, so he started a 2-hour a day deep dive, and got REALLY good.

At Windows Batch files.

let him at it, until he reaches the limit...

Then introduce Ruby, it seems to have a pretty good binding for Windows stuff

That's what I did.

I started with a really small BASIC for learning, after a bit I started messing with bash (my father used Linux, so I used Linux), and made some godawful scripts.

I was around 11 at that point, so most of my work was in a "choose your own adventure" text game where I also experimented with making a UI in the terminal with text. Then when I couldn't get it to run fast enough, started messing with C which I heard was faster, then picked up Java because I wanted to make a real UI (not a single one of the books on programming talked about any ways of getting a UI with C or C++), and from there to web languages because I wanted to build a website, and that launched my career.

Each step I hit a wall and struggled on my own for a while, and I think that was the most important part. I needed a solution, and that drove my will to learn. My dad only ever stepped in when I specifically asked, and even then he'd only get me a book/resource or give me some hints or very light help.

Feel like that title needs a tweak..

Learned JavaScript ? Or learned about JavaScript. Maybe "how I kept my kid interested in programming", "short attention span vs programming", "getting your child into programming". There's a pretty good click bate video on YouTube that says "15 year old dreams in code" and it was something along the lines of he made game where the ball moves to the left and right with your keyboard and score increments...basically the tutorial for his framework. I think the problem is the school system not pushing some of these basic introductions into a few classes. There was a time unix commands were day to day office needs for almost every employee at certain places...and then poof the GUI killed it.

> He just lost motivation. I guess command line output only motivates a kid so much these days.

That's why we made text based games and an tkinter based RPG game at a coding bootcamp where I do mentoring.

Honestly, the two things that kept me motivated to keep writing (actually writing, not just "oh hey this is cool") code when I was learning were games and my girlfriend.

Games - We were learning how to play Pathfinder, so I wrote a little character creation thing in Python.

Girlfriend - thought it was awesome when I wrote her letters that were interactive programs. Though I found out later she didn't want to go through multiple times to find everything I'd written, so she just skipped to reading the source.

I'm glad to hear this is still happening! I learned C as a kid some 20 years ago writing a text-based RPG. It was just the right balance between "look everybody I made a game" and "wow there's a lot more to learn," which is a pretty ideal outcome for someone new to programming.

That said, I only got into C because I was already tinkering with computers and BASIC, and I don't think my young curiosity about machines would have held if I were being instructed to learn them by an adult. Kids are funny like that.

An anecdote about motivation: when I was in grade school, I made custom maps and scenarios for Starcraft (the original), with if-then-else conditionals, and the like.

The official editor had a wizard where you would enter these, but it was extremely tedious to use, requiring lots of mouse clicks. Alternate editors were starting to come out that would let you enter these events as a script, so I turned to scripting instead.

After a while, hand-writing the script was becoming a chore, so I wrote a code generator. I realized that the browser had a script interpreter and I could just use checkboxes and form inputs and lots of Javascript to manipulate a bunch of 'document.write()' statements to produce copy-pastable code.

I had no interest in programming, and yet I using programming as a tool without realizing it.

Congrats on sharing with your son! I would be interested to learn how he responds to https://groklearning.com/
That looks very interesting, especially the competition aspect. He might have to brush up on his Python a bit. He also enjoys CodeCombat, which I forgot to mention in the post.
Thanks for the interesting article! Are there any recommendations for non-English speakers? I'd be especially interested in German materials. I'd love to teach my eight year old daughter about computers and programming, but there are close to none books and resources available if the kid doesn't speak/read English yet.
I honestly didn't recognize his description of closures. It sounded like memoization. Closures are probably best understood without metaphors like that, scoping in JavaScript might be weird but it is consistent everywhere- only functions have scope, and they carry that scope for their entire life. I think just thinking of everything in the language as a collection of scopes really clicked it for me.

The real trip up with javascript I often see even in professionals is asynchronicitiy, since JavaScript has a run loop.

That description of closures is really odd to me and I know for a fact that it would not have worked on me as a child. After spending some time teaching programming to middle schoolers/high school freshmen, I think they're really something that comes more naturally than that. The way scoping works for closures is almost instinctual in my experience, but the anonymous part is much harder to understand. Trying to write functions inside of functions is also fairly natural (although you might have to nudge the kids into that style of thinking), so you can teach closures with the use of named inner functions. I still haven't found a great way to teach lambdas that really sticks without them writing some code first and seeing how they can fit lambdas into there...
(comment deleted)
What do you think about teaching JavaScript as the first programming language rather than Python? I know that some think JavaScript is a better choice [1], because it's so much easier to produce a real application as opposed to a command-line toy. But the opposing argument would be that JS has so many flaws, or more charitably, it's such a quirky language. Also, any opinions about Khan Academy's platform and lessons for learning to program with JavaScript [2]?

I'm not a parent, but my friend's 10-year-old son has asked me to teach him to program.

[1]: http://prog21.dadgum.com/203.html

[2]: https://www.khanacademy.org/computing/computer-programming

I would never inflict JS on a kid I liked
Is that just knee-jerk dislike of JS? If so, that's nothing new. Haters gonna hate.

Or are there specific language misfeatures that you think get in the way of learning?

I think JavaScript is a perfect entry point in a way that Python doesn't seem to even try to be. Sure there are warts and syntax problems and it's a little weird but beginners for the most part won't even run into that. But for that one small, minor downside, all of the upsides far outweigh it. It's used everywhere (almost literally) so it will always be relevant. It's super trivial to get something to print graphics on a screen, where Python graphical frameworks are scattered, outdated, or limited in functionality. Compare PyGame to Phaser and you'll see what I mean.

JavaScript is the right way. Python is right for a budding computer scientist who won't care that they're limited to a terminal for months while they learn. Javascript is right for everyone else who wants to see some immediate and modern progress while they're learning.

What I find makes teaching programming in JS challenging is that, by its very nature, there is a lack of a single canonical resource that you can go through to build out your understanding from start to finish.

This isn't to say that such resources don't exist, but the fact that Javascript is the language of the web will simply make it impossibly difficult to follow a nice coherent pattern and you/the child will instead inevitably slowly drift to other things, and the risk is moving onto other concepts before the necessary scaffolding is in place and before they have a firm grasp of basic programming principles. Since the "web" is right there, it will be hard to fight the urge to start to do "engineering" while the focus should be on basic cs and programming concepts.

My advice (former school administrator) therefore is to teach programming to a kid using a canonical resource that they can use as a bible, but one also that will give them the freedom to build interesting things that they can share with others. I think Matthias Felleisen's HTDP is a fantastic book. You simply can't beat it when it comes to talking about patterns, design recipes, and overall how to test and think about an algorithm. And while the syntax may be challenging at first, functional programming and LISP in general actually offers less of a mental leap for kids who are used to algebraic expressions and function composition.

If this is a gifted 10-yr old, HTDP with some adult guidance will offer you the best bang for your buck long term. Some of the projects at the end even involve networked games, so there will be plenty there to motivate a hungry youngster.

Thanks for sharing your perspective and advice. What do you think of Pyret (http://www.pyret.org/) and the accompanying textbook (http://papl.cs.brown.edu/2015/)? That should meet your criterion of a canonical book to work through. And that book is written by one of the authors of HTDP. But Pyret has a more conventional syntax and runs in the browser.
Ashamed to admit I don't have any familiarity with it! I can vouch for other content of Shriram's that I came across, most notably some of his labs for his CS class at Brown -- they are absolutely awesome. So, I've got a feeling this is a prob. also an excellent book.

EDIT: I forgot to add this: I mentioned that the syntax is challenging to kids at first BECAUSE there are so few rules, there is quite a bit they have to keep in their head as they write even very simple programs. You have to very quickly internalize the idea of function composition or else you are stuck, and that may be challenging for a young child at the beginning. But, at the same time, I think this is also a huge STRENGTH of the syntax. If he/she isn't getting this, it is pretty obvious and you simply cannot go anywhere until this happens, which isn't necessarily a bad thing. And, once they grasp this concept, then it is actually extremely easy because there aren't really any other syntactical rules to memorize and keep in order! This did require a lot of focus of kids, but I think there was something reassuring in the fact that they felt confident they understood all of the necessary principles of how the language was working, and that if they experienced issues, it was either in their own logic or in chasing some rogue parens. YMMV

What makes a canonical approach ideal? In my experience, there are few jobs worth having that provide a bible. I can see that a bible would be a convenient teaching aid, but it misses a great opportunity to teach research skills as well as critical thinking and discretion. Please let me know if I'm way off base.
The most valuable thing you could give a young learner is a solid foundation upon which to scaffold future learning. You are absolutely correct in saying that research skills and discretion are hugely important and valuable. However, someone who hasn't yet build a solid foundation of understanding will have a VERY hard time assimilating content he researches into a coherent mental model of how everything fits together.

Therefore, my advice to begin with a single canonical resource is that this increases the likelihood that someone's introduction to this stuff will be coherent and well-reasoned, and will introduce him/her to solid fundamentals. As someone who has been involved with teaching kids and coding, it is unfortunately very much the norm that "coding" classes devolve quickly into copy and paste exercises, and the reason for that is that is that kids' gap in understanding ends up simply being replaced by pattern-matching.

With programming, you have so many competing motivations/factors -- what you want to build, what you are learning, why you are building/learning, etc. -- that it becomes quite challenging to juggle everything coherently. I've always favored a single canonical resource to start because, more than anything, it is a way to drown out that noise. If you pick a good book, there is a rationale behind the order topics are introduced and there is reason to the increasing complexity and difficulty of the exercises presented in the book. If you hop around doing different things, you massively increase the chance that there is some basic concept you won't learn and that you will start creating an improper mental model of how things work. And, without this canonical resource, you may have a really hard time seeing that the reason you are struggling is because you lack some basic understanding.

So, I agree with you that there are no jobs worth having where a "bible" is provided; but I think that a learner -- and especially a novice learner -- greatly benefits from a resource like that to ensure that they have solid fundamentals onto which they can then graft other knowledge they seek out themselves.

Thanks for the thoughtful response. I think I see where you are coming from now. Now that I think about it, I even have some personal experience with the benefits of canonical learning.

I was a copy and paste web-developer for a while and it got me by but just barely. At some point, I discovered Michael Hartl's Rails tutorial. Rails was pretty foreign to me compared to the basic HTML/JavaScript stuff I was doing but I found it interesting and gave me the opportunity to learn web development from first principles.

Learning Rails in that environment made me a much more thoughtful and deliberate developer. All my applications since, even though they aren't in Rails, have benefited from that experience.

I have had personal experience with being commissioned to write a comprehensive resource for work. It is really a futile task in a lot of cases. Things change so quickly that they are different before, during, and after the writing and editing process. This does allow for the room for the learner to fill in the gaps and develop critical thinking and discretionary skills.

I think I was seeing this as too black and white when there are many shades of gray.

Once again, thanks for the education.

As a former teacher, who ran a programming club at a middle school and taught an advanced 8th-grade math class included programming, I have some perspective on this. I would say, be wary of "fundamentals" and "doing things the right way." Teaching a 10 yo something optional needs to be fun, or else it won't happen.

The author of this article nails it: there's nothing quite as motivating as adding "Poop" to the title of a real web page. Also, you can Inspect Element and get what is effectively an IDE. Is JavaScript the best language? No, it's inconsistent and confusing. But, so is English, and a lot of people learn English first - because it is practical to do so.

Another option that can be useful are Google Sheets. If they are a certain type of kid, they might like logging all of their toys in a spreadsheet and finding the total of the toys and making charts. Of course, most kids will find this boring... but you can also use Google Scripts to do something like scrape a subreddit and store it in Drive [1], which could be fun.

However, why not start with Scratch, or Snap! [2]? They are powerful enough (especially Snap!, I think you can define new data types in it...) and so much less intimidating.

[1] http://ctrlq.org/code/19600-reddit-scraper-script [2] http://snap.berkeley.edu/

> Teaching a 10 yo something optional needs to be fun, or else it won't happen.

That matches my intuition. But the word "fun" brought back to my mind this epigram by Alan Perlis:

> It goes against the grain of modern education to teach children to program. What fun is there in making plans, acquiring discipline in organizing thoughts, devoting attention to detail and learning to be self-critical?

Unless I have completely misunderstood this epigram, I think the point is that programming, when done well, is not fun; it's work. So maybe if we try to make programming fun so we can teach it to a child, we're setting bad expectations for what it will be like if they pursue it seriously.

So I guess that means that when teaching programming to someone of any age, we do need to focus on fundamentals and the things that Perlis mentions in that epigram. Then, if a 10-year-old kid loses interest, we should just let it go.

Makes me wonder if I and other self-taught programmers of my generation (I was born in 1980) built our careers on a bad foundation. I started learning to program in BASIC on my family's home computer when I was 8 years old, because when just dabbling in BASIC, it was fun. Even tinkering with assembly language was fun. But the important thing to note is that as far as I can recall, I produced only one truly worthwhile program as a pre-teen, and that was one that a relative asked me to write. And that was a serious project, not a diversion (AFAIK, the latter is the definition of fun, as is apparent from some languages like Spanish).

As for Perlis's jab at "modern education", I suppose the take-away is that we need to teach kids early that life isn't fun, rather than trying to make everything fun for them.

(comment deleted)
"because its like English": best argument for learning javascript I've ever heard.
IMO (and I dislike JS) it doesn't really matter. If the kid is really interested, they will go out of their way to learn new languages eventually.
This may sound strange, but maybe even Visual Basic or C#?

It allows you to easily create GUI applications and I assume thats what's interesting. Switching to other languages is easy enough, but capturing interest is key.

The closure description sounded more like memoization.
Loved this article. I especially liked the 'Explaining programming concepts to kids' section.

Please keep us posted about what your kid is building next.

Like a few people in this thread, I didn't really buy the closure analogies. I think if that were my first exposure to it, I'd end up with some pretty wrong ideas about how they work. Specifically, it's not a snapshot.

I was bothered enough that I went and quickly wrote an explanation of closures in five steps. The language probably needs tightened up a bunch, but I'm curious if it's useful?

https://jsfiddle.net/hghgp6x2/

Programming is so easy anyone mildly interested can learn it. Specially a kid. The key point is the interest. Kids will never be interested if they never hear about programming, but you can also not force interest on them.
Realm of Racket would likely have been a really good alternative.

Maybe NAND to Tetris.