Ask HN: Teaching programming to a 10 year old, and I'm kind of lost
Basically, I was wondering what would be the ideal introduction and flow to teach this - ideally it would start out easy and the more engaging the better! Obviously it makes no sense to try and force something if the kid isn't interested, so help me make it interesting and easy to understand!
I was thinking
-Scratch or Alice for the basic concepts
-Then either learnpythonthehardway, diveintohtml5, diveintopython3, ruby+shoes (hackety hack) (thanks to the respective maintainers/creators of these apps/sites)
Any comments (with or without experience) would be appreciated greatly, as I am unsure which of these would be most appropriate for a complete beginner, or whether there is something else that would be more suitable.
50 comments
[ 2.7 ms ] story [ 116 ms ] threadWhen we got our first computer, my then husband was excitedly explaining to me how to do stuff on it. I stopped him and said 'Where is the on switch??" My point: You may need to scale things back to where she is from your current vision.
Also, I recently showed my two sons a little html and css. My oldest has been wanting to learn a programming language and not finding anything intelligible for the way his mind works. A few minutes of demonstration and the light went on as to what kind of info he needed, which he promptly began looking up. We also used analogies using video games to provide some mental models for it. So if you run into any hitches, consider trying to adapt to her learning style and using something she is familiar with to provide examples.
Good luck. And I still want to learn a programming language, so would love to hear how this goes.
I've taught several people quite new to computers Ruby and HTML, I've found the hardest thing they try to grasp is logic, drill into their head how conditionals and boolean logic work - it's needed everywhere.
EDIT: I can't stress this enough, I've had people where I thought I've made a break through, they seem to grasp it, then two weeks down the line I look at some code they're trying to debug, and it's like they completely forgot how flow control and conditionals worked.
Hackety is designed for people that are absolute beginners at the moment, and I plan on making more 'intermediate' and 'advanced' things later. We're still pre-1.0 for another few weeks, though, so there still might be a few small rough patches. Specifically, soon it'll just be one program, rather than downloading both Shoes and the hackety.shy.
http://carlos.bueno.org/2010/07/corrupting-the-youth.html
http://csunplugged.org/
Also, please email me (in my profile). I'm working on something in this area, and I'd love to have some more kids to use as guinea pi-- er, research assistants.
Step 2, teach the things required to do tasks.
For a child, you should focus on things that they can understand the output of. Sound, animations, pictures. Turtle/logo is a fantastic platform in this regard.
For, well, everyone, you need to ensure that what you're teaching is what they're interested in. If they're not excited about moving a cursor around a canvas, then they won't learn anything.
You'll know you're teaching correctly when they start doing things on their own that you didn't expect.
Sean
http://en.wikipedia.org/wiki/Not_Quite_C
As a kid, I found the logic relatively easy, and the control structures moderately easy. Abstraction and complex types were the difficult part for me, and I still tend to evolve them by trial and error rather than defining them in advance (though having done so, I usually enjoy refactoring as soon as I have a working prototype).
I would start by asking him/her what she/he wants to do. Pick the tool that fits best. Want to build a game? Start with Scratch because it teaches the actor-based programming that you want to use for games.
Hard to give more advice without more specifics.
I think it's a pretty good introduction to programming for kids of middle school age, though it assumes familiarity with elementary algebra and the Cartesian coordinate system. Others have taught it to students in the 5th grade, who had no prior algebra experience, though I can't personally vouch for how effective it is for those students.
I modified the standard Bootstrap curriculum quite a bit as I went along, removing the written workbook exercises completely (my students hated them), and replacing them with interactive programming exercises. I replaced some of the least-engaging programming exercises with some of my own creation. For example, I designed a lolcat image macro exercise for the "Introduction to images and strings" lesson. It was a huge hit: kids were making screenshots of their images and sending them to friends. I also added support for projectiles, background music, and user-defined sounds to the standard 2D game engine, in order to make the final games more compelling.
In the future, I think I'd rather use a problem- or project-based approach to teaching introductory programming, but Bootstrap is the best freely available, structured curriculum I've found so far. My main frustrations with it were the written workbooks, which I eventually dropped, as mentioned above; and the fact that I only had 10 90-minute sessions, meeting once per week, to teach it. That's barely enough class time to get through all the material, even if things go perfectly smoothly. It's definitely not enough time to give students the opportunity to explore and experiment on their own, nor especially to fail and then learn from those failures, which, in my experience, is the most effective way to grok programming. However, the compressed timeline was a limitation of the after-school program I was teaching in, not Bootstrap per se.
Find out more about Bootstrap here: http://www.bootstrapworld.org/ I'm happy to give you my modified Bootstrap framework (with projectiles, etc.) and the Keynote slides I used for my lectures. The slides have very few words; they're mostly animations, diagrams, and images intended to reinforce the oral lecture.
I also "taught" a couple of Scratch sessions to middle-schoolers. You don't really teach Scratch, though; in my case, it was more like giving a 10-minute demonstration of building a simple Scratch program, and then turning the students loose, and giving them a bit of assistance when they got stuck.
Student engagement with Scratch is typically much higher than with Bootstrap, in my opinion. My Scratch sessions were each about 2.5 hrs long, and almost all of the students kept experimenting from start until finish, with 3 or 4 even staying an extra hour afterward during their free period. However, personally, I think I'd move on pretty quickly from Scratch to something capable of procedural abstraction, if a student showed a continued interest in programming after a month or two of Scratching. Among other issues, there's simply no means for students to create their own blocks in Scratch, nor to encapsulate groups of blocks into larger blocks. However, I just heard from a friend that there's a new version of Scratch coming, code-named Sage, I think, that will provide at least some of this missing functionality.
Scratch certainly requires less effort on the instructor's part than Bootstrap. Scratch includes a ton of assets, for one thing. With Bootstrap, when your student(s) come up with a game idea, you might have to help them find images, and then do some Photoshop work to extract them from their backgrounds, scale them, etc.
Another problem with Bootstrap is that the students seem to be quite confused about control flow. They don't understand how the whole process starts, proceeds, and then repeats itself. The confusion occurs because the students are only writing callbacks, and are never exposed to the event loop of the game engine.
Scratch does not have this problem. Scratch programmers are entirely responsible for deciding how events are sequenced (when they need to be, at least; without explicit sequencing, everything in Scratch executes in parallel by default, which is how the real world works and is therefore familiar).
I think understanding control and/or data flow is a crucial concept for introductory programming. It helps the student develop a complete mental model for how programs, when executed, create dynamic processes. For my Bootstrap classes, I came up with a pretty silly real-world scenario in an attempt to explain to them what Scheme and the game framework were doing behind the scenes, to give the students at least some sense of "who" or what was causing their functions to execute, but I'm not convinced they really understood it. There was a bit too much magic going on for my liking.
Instead, get him into languages that have a limited instruction set. this link:
http://marshallbrain.com/kids-programming.htm
came my way a while ago, and it has a few examples of things that you could use. Light-bot should be a lot of fun for most kids, and it could give kids a good foot hold into greater abstraction.
http://www.amazon.com/Mindstorms-Children-Computers-Powerful...
The main point is to have children do something they understand from the real world and have a physical relationship with. That way it won't feel as abstract.
So my advice is teach something that is practical and understood by the 10 year old. That's the best way to keep him/her interested. No point teaching stuff and telling him/her to have faith that one day it will be useful. That's not effective! You can let college do that later. But right now it's best to show the cool stuff to really get that interest going. So you don't necesarily have to start with the basics. Something cool, show him/her how to tweak it, voilà.
http://developers.slashdot.org/comments.pl?sid=174164&ci...
Like: Program is a list of instructions for computer to do and variable is a "box" where some value is contained.
To make it more engaging you probably need to homebrew some nice and easy to understand demos. Random idea: write a simple graphical library for visualisation for your favourite language to use with your demos.
1. Setting tasks that are within reach but will stretch his ability (and getting his buy-in on the idea before you start)
2. Teaching him how to find the answers to his own questions
I'd do all the setup yourself so the kid can jump straight in to producing something. I'd use FTP as it's easy to conceptualize. Avoid the command line and version control.
I'd start with HTML (written in Notepad) so that you can learn to present any data output. Just teach basic tags: h1, p, table, a href. Use w3schools for reference. Build something like a 'My Family' website with a page for each family member and links to the others.
Then maybe stir in a bit of CSS - again just basic stuff (colors, borders, positioning) and again using w3schools for reference. Use this to make the My Family website a bit prettier.
Then try some PHP/MySQL. You could save each family member in a table and use one PHP file to display each one based on an id specified as a get var.
Simple project ideas to try after that could be a simple CMS or (my favourite) a very basic Twitter clone.
He started 5th grade last week and one of his classes is a programming class which uses MicroWorlds - http://www.microworlds.com/ - as the learning platform. I grabbed the demo and may shell out the $100 for the home version, just so he can do stuff here in it as well. It's not a horrible system, but it's definitely rough around the edges.
I fully expect to have him starting in Python by 6th grade, tho.