4 ms·
How young can a child learn to program? While I'm not ready to indoctrinate my four-year-old into the monkhood of true geekery while he's getting in his prime
by failrate 13y ago
How young can a child learn to program?
While I'm not ready to indoctrinate my four-year-old into the monkhood of true geekery while he's getting in his prime running around time, I was curious to see how logically he could think. My layman's knowledge was that children began properly interpreting and creating rules around the age of six, while four was still wild imagination territory.
For my experiment, I created an extremely minimal programming game, like a very stripped-down version of RoboRally:
https://dl.dropboxusercontent.com/u/5458223/robot_factory.jpg https://dl.dropboxusercontent.com/u/5458223/robot_factory.jp...
The image depicted is doctored. We had already completed four playthroughs the night before with a similar setup, however. He was able to figure out how to program the robot to collect all of its pieces (three Duplo blocks comprised the robot; successful completion of the robot wins the game). I demonstrated the rules once, and then let him try to play by himself with minimal guidance. One interesting strategy he discovered was placing the "instructions" (the cards with arrows) on the game board in order to create a path.
https://dl.dropboxusercontent.com/u/5458223/robot_factory_redux.jpg https://dl.dropboxusercontent.com/u/5458223/robot_factory_re...
A few weeks later, we played it again, and I taught him how to make new "instruction cards". We're not yet at the place where we've done anything with variables and abstraction.
Apparently he liked the game well enough, because he independently recreated it at school:
- idancali 13y agothat's great man! I'll try that with my 3 and 5-year old boys to see if they pick it up. I was thinking about the whole "how young can a child learn to code" thing too and I think it's obviously a matter of the environment they're used to. If they create a lot, arts/etc, play with Legos for example at a young age, that sort of stuff, they might be inclined to pick up more abstract things at a younger age. My daughter likes doing a lot of math stuff for fun and she has a tendency towards numbers and abstract thinking so she picked it up naturally. We'll see how the boys do in a couple of years :)
- scoofy 13y agoA child using language functionally to get what he or she wants is essentially a form of programming. Example: 1. result = ask_parent_or_candy(mom, nicely) 2. if result != candy: 3. ask_parent_for_candy(dad, nicely) I studied analytic and philosophy of language, and i feel that many people in CS don't see the forest through the trees when it comes to programming as such. While some code (e.g. C) handles much more technical aspects of what is actually happening, scripting languages are much better suited to the human mind, and i think creating a natural language language (<-- that seems a bit redundant) is an achievable goal. If i had a child, i would start her out on python, because python is essentially in english, and english is the only code i'd prefer to write, given the choice if there were a formalized english scripting language. Even in python there is a bit of jargon that i think is an unfortunate holdover. Int vs float may be necessary, but "string" is a poor term for what is essentially text. I'm not saying we should change anything, because coding is becoming more like natural language organically, but again, if i were to teach my child coding (and i don't want to step on any cuteness of this story), i think a child would understand python better than anything with brackets and semicolons. Full disclosure: i genuinely like python better than most languages.
- anaphor 13y agoYou're mistaken I think. Computers essentially process numbers, and even though they are okay for building abstractions, they invariably end up leaking. The complexity in programming is not in the language used to describe it, it's in the details of actually making it work. Syntax is generally irrelevant and only exists to make things easier to read. Also jargon like "String" is actually a holdover from formal logic (so analytic philosophy!). Also, "There will always be things we wish to say in our programs that in all known languages can only be said poorly. " -- Alan Perlis
- idancali 13y agoI completely agree with the fact that syntax is irrelevant. What's really key in coding is getting the core concepts down, like variables, control flow, methods, classes, etc. To me, if a kid can understand what a variable is and what a value is, that's awesome, I don't care what language it is. Once they pick up the fundamentals they can go and teach themselves whatever language they want.
- scoofy 13y agoFair point on "string," though i never really encountered it, i opened up an old goldfarb book, and it's not in the index, but it looks like it is used in my old enderton "mathematical introduction to logic," so, again, fair point. I think "statement" would be a better term, maybe. enderton page 107, 289, etc: http://books.google.com/books?id=dVncCl_EtUkC&printsec=frontcover&dq=introduction+to+mathematical+logic&hl=en&sa=X&ei=WdFBU6OEI6K-2wW-_4DQDQ&ved=0CFAQ6wEwBg#v=onepage&q=string&f=false http://books.google.com/books?id=dVncCl_EtUkC&printsec=front...
- idancali 13y agoyeah I wondered about string myself, I don't see how a child could get "strings". I think they would get "letters" or "words" or even "text". That's why I just didn't get into strings, I just let them type stuff and see the result of what they were typing in the simulator which was thrilling. And when it came to teaching variables I went with int's. Even that was a long shot. I just went with "it's just a number" and I think that should be sufficient for lesson #1 :)
- analog31 13y agoWhen they're old enough to play music. ;-) I'm no psychologist, just a parent of two curious kids. I think a lot of things come together at around the age when kids are reading, and beginning to write. Another question I'd think about is: When is a child too old? Those years around 6 to 12 (give or take) are a beautiful time because kids are curious and active, but they haven't yet fully internalized all of gender roles and rules about who can be interested in what. Also, they are still at least a few years away from that terrible age when things like GPA and job skills matter, so they are free to explore interesting subjects for fun and not according to any particular set of rules.
- idancali 13y agoIt's interesting actually, not that you mention it, this week my daughter read her first 20 page kids book. In English, as her second language. Her first language is Romanian and we speak Romanian at home. I do believe this is a beautiful age for kids to see what their brains can do. There's so much potential at this age, and if their curiosity is fostered they end up doing amazing things and starting off with the right foot in life.
- mehrdada 13y agoI started using DOS to run games at around 4, when my dad bought a PC, and taught myself batch programming and QBASIC when I was 6, so I think the ages you mentioned are probably correct. (For many months, I had no idea there is such a thing as "else", so I used to end the body of "if" statements with a "goto" to jump over the next few statements to emulate the effect of an else clause.)
- idancali 13y agohaha that's awesome, I had no idea about a lot of stuff when learning but that's the amazing thing, you don't need to know everything to get started and start building things, and that's what scares people off, they think they have to get a math or comp sci degree to code something basic
- exue 13y agoWith web programming, a lot of the initial hassle and set up is gone, and visual learning/iteration by hitting refresh is very easy. So I would say, almost as young as they can play around with a web browser, and type on a computer. You can immediately start seeing results by typing in the Chrome inspector console. I think even a 4-year-old would be able to understand an if/else, but I'm not behavioral psychologist.
- idancali 13y agoyeah that's a good point; I really wonder about conditional statements though, I think control flow should be straight forward, but I would think you might need to start off with variables and primitives at least.. what do you think?
- exue 13y agoAgreed - you can't really do much without variables/primitives first. Which are might be conceptually harder to grasp
- ehsanu1 13y agoYour game is reminiscent of http://www.robotturtles.com/ http://www.robotturtles.com/