Ask HN: Teaching a child to program?
Suppose I have a somewhat precocious child who shows an interest in programming and solving hard problems, and has a fairly decent grasp of logic. How would you approach teaching him or her to program? What age is a good age to start?
2 comments
My oldest is almost 5 so she's got her alphabet down, but not reading yet. However our neighbor is 6 and she reads fairly well. Maybe around 6 years old to start learning programming?
My daughter is ten, and she just started picking up some Python and Javascript. I got her started on the codecademy lessons, which she had a hard time with at first, but then started sailing as she began to understand the example / question formats a little better.
One thing I've been doing is outsourcing small code snippets to her (mostly for vanity, I got the idea from Louis CK's notion of getting his daughters writing / production credits on "Louie") that I need in code I'm writing.
The obvious key is to start off very simply. In addition to the codecademy lessons, I've been giving her small tasks like "I need a function that accepts a string as an input, and return a string that replaces all hyphens with nothing." It obviously takes her awhile longer than the minute or so I'd spend on something like that, but it gives her something to do, and like all of us, I think learning is fostered more by a meaningful application than a more trivial one.
Beyond that, I'm not an exceptionally good teacher or anything, but if they're interested, give them an opportunity to learn and just try to foster that opportunity in more meaningful ways than doing code exercises. The goal with my daughter is to have her begin on a simple game starting in the next few months (or whenever she seems ready, an obviously subjective metric.)
One thing I've been doing is outsourcing small code snippets to her (mostly for vanity, I got the idea from Louis CK's notion of getting his daughters writing / production credits on "Louie") that I need in code I'm writing.
The obvious key is to start off very simply. In addition to the codecademy lessons, I've been giving her small tasks like "I need a function that accepts a string as an input, and return a string that replaces all hyphens with nothing." It obviously takes her awhile longer than the minute or so I'd spend on something like that, but it gives her something to do, and like all of us, I think learning is fostered more by a meaningful application than a more trivial one.
Beyond that, I'm not an exceptionally good teacher or anything, but if they're interested, give them an opportunity to learn and just try to foster that opportunity in more meaningful ways than doing code exercises. The goal with my daughter is to have her begin on a simple game starting in the next few months (or whenever she seems ready, an obviously subjective metric.)