Teaching kids, part 1


ApprenticeshipThoughts

While chatting with the Obtivians the other day, I discovered that there were 12 kids between them all. “Hey, we should put on a course for them!!” I joked. Couple hours later, the idea of developing a grade school-level programming course had completely consumed my mind. Next week, I’ll actually be starting on this endeavor by mentoring just one of the kids, Dave’s 8-year-old daughter Rose. I thought I’d toss out my initial ideas to you guys before I get too far — I’d love to hear any thoughts you might have!

There are a bunch of questions I’ve been keeping in mind as I work on this:

Code Quality: Is it better to show a child how to write clean code from the start, or is it better to teach a verbose, inefficient manner of coding in order to inspire more appreciation for clean code later? For example, would it be worth teaching the deprecated HTML font tag to help the child understand the benefits of CSS later?

Languages: How beneficial is it to begin with programming languages designed for kids rather than starting a “real” one? Along those lines, which would be the easiest programming language for a kid to learn?

Projects: Is it better to assign projects that mirror real-world tasks (keeping a blog), or should I assign projects that are just for fun? (Here I think of the crazy little MIDI-playing, marquee-scrolling, secrets-filled website I made when I was 15: “Victoria’s Galaxy.”)

Motivation: What’s the ideal source of motivation for kids learning to program? Is it the more intrinsic motivation stemming from solving low level problems and seeing the beauty in well-written code, or the more extrinsic motivation of ending up with a cool product they can show their friends? Obviously, the latter would come more naturally; I’m just wondering which would be the ideal — or if there’s something else that would be an even better motivator.

Health: I tend to believe that in order to really get good at skills that take a huge amount of time and dedication, you basically have to get addicted to the activity for a while… is it possible for a kid to learn these skills without spending an unwholesome amount of time sitting at a computer screen? What are ways to get this knowledge to stick beyond just plain “programming a lot”?

In a week or two, I’ll post on the specifics of the curriculum I’m starting to put together.


18 Responses to “Teaching kids, part 1”

  1. Carmelyne Thompson

    I’d rather you teach them non-deprecated stuff straight away. The reason being, they’ll have to unlearn it and sometimes unlearning something and giving it up is even harder than learning something new.

    Also, moderation is key. You don’t really want want a prodigy like J.P. from Grandma’s Boy eh. Now that was a good movie.

    Kids tend to learn things faster if it was game based or a song.

    Reply
  2. Bill Caputo

    I think Logo is a great language for very young children:
    http://en.wikipedia.org/wiki/Logo_%28programming_language%29

    The immediate gratification of seeing results on the screen makes keeping interest high easy.

    As for style and avoiding deprecated constructs, I think these would not be my first (or even second) concerns for initial exposure to programming (especially young children, but really at any age).

    Much like anything else, learning fundamentals and principles — and building enthusiasm — is more important than higher craft concerns when just starting out. These rest comes naturally (assuming they are learning from those who value such things) as they progress. That said, I wouldn’t artificially oversimplify either. Instead I recommend approaching it like other complex subjects like writing, tool-use, music, cooking or chess: do things correctly but simply and keep the lesson just beyond their current capability (to your examples ‘yes’ to descriptive style and no to ‘css’).

    What you definitely want to avoid is overloading them with too much too fast. Just get them used to the ideas that programming a computer is a puzzle to be solved a way to explore their creativity and let the learning unfold from there at their pace.

    Reply
  3. Andy D.

    I thought through the same things before.

    I think that things like learning to read Venn Diagrams and deciphering syllogisms are great ways for youngsters to become familiar with the thinking style useful in software development. These can be made really fun to an inquiring mind, as you can present ‘almost reasonable’ propositions (to the untrained mind) with logical flaws.

    Have fun.

    Reply
  4. Dethe Elza

    Hi Victoria,

    You raise several points, which I’ll try to address.

    1. Code quality. With kids I would (even more than with adults) value pragmatism. Get working code, then work on getting beautiful code. And definitely more verbose code which they can read and understand is preferable to concise code which is unintelligible magic to them.

    2. Language. I favor Python and have tried to teach my 10-year-old, but it hasn’t taken yet. We collaborate on a game where she does the art and I write the code, and as we get more of it working, she is more and more interested in the code. My six-year-old is getting interested in the code by watching us. On the other hand, she was able to pick up Lego Mindstorms programming right away. Ted Leung has had success with his daughters and Squeak:

    http://www.sauria.com/blog/education/1457

    And there is a new programming environment for animation and games with a Mindstorms-like visual programming metaphor, called Scratch, which looks pretty accessible.

    http://scratch.mit.edu/

    Projects: Games are always good. I’m working on an animation program and my kids have been great beta testers (they are expert at finding flaws and have no mercy as critics). My ten-year-old also has started a blog and that is pushing her to learn more about how the web works. Once they have something that grabs their interest, there is no stopping them, they’ll learn from us or despite us.

    Motivation: Whatever the project, there has to be a sense of accomplishment, and they have to see the direct effect that results from their programming, which is why Mindstorms is so good (nothing like seeing something physically move around because of what you told it to do). Nintendo games are popular and addictive because no matter how well or poorly you do, you are always left with the feeling that you know how to do better next time. That kind of constant progress is what you want to aim for.

    Health: I limit my kids’ time on the computer pretty strictly. They definitely can get too obsessed with it. And we got rid of TV before having kids. But if you do succeed on hooking them into thinking about the kinds of problem solving that works for programming, they will begin to approach other problems that way. You can make games related to their projects, but which involve running around outside. Kid (and adults) who get enough exercise and fresh air will make better programmer and more well-rounded people.

    I hope that helps. Good luck with your tutoring sessions, you’ve very brave to dive into that.

    Reply
  5. SarahMei

    I put together a list of resources for teaching kids programming last year. My daughter’s 2, so she’s not quite ready for this stuff yet :-) — but there is a lot out there, and which will be appropriate really depends on the kid.

    For most kids, though, graphics-related programming (html, etc.) where they can see the results quickly are best. In addition, avoid any language or environment that requires any extra steps between “create” and “see results” (such as compilation).

    And – like a previous commenter said, pragmatic. It’s supposed to be fun, so don’t get bogged down in syntax and indentation if you can avoid it. Demonstrate good practice while ‘pairing’ with them but don’t enforce it on their code.

    Sounds like a really worthwhile project. Go Victoria!

    Reply
  6. gaba

    It looks like a really cool project! I learned to program when I was 10 years old from my friend’s dad. He used to gather his daughter and two friends on saturdays and we learned basic with him. The cool thing is that we were always starting with paper and flow diagrams! On the other hand now (20 years later) there are so many other cool things in the internet that the kid can related to… I think that tie things to her/his “real world” is always a lot of fun!

    Reply
  7. rentzsch

    Cute “kid on a notebook” drawing. Like the buffy hairdo.

    “Is it better to show a child how to write clean code from the start, or is it better to teach a verbose, inefficient manner of coding in order to inspire more appreciation for clean code later?”

    I probably have professional peers that will disagree with me here, but I think emphasis on should be placed on “getting things working” versus “writing clean code” when learning to program. I say this because my number one concern in introducing anyone to programming is “losing them”. It’s remarkably easy to simply beat out any desire to program from a beginner.

    “For example, would it be worth teaching the deprecated HTML font tag to help the child understand the benefits of CSS later?”

    I would teach modern best practices from the get-go. But it’s also important to fully acknowledge previous techniques, since they demonstrate design/architecture evolution in action. Your FONT tag is a good example. Literal tags simply weren’t a great solution in at least a couple of aspects, providing a great example of how CSS’s pattern-matching is a better solution.

    “Languages: How beneficial is it to begin with programming languages designed for kids rather than starting a “real” one? Along those lines, which would be the easiest programming language for a kid to learn?”

    I’d teach them JavaScript. Everyone has a web browser, and kids are already comfortable with them. The immediate interaction with persistent visual objects (HTML buttons, the DOM, etc) is a winner.

    “Projects: Is it better to assign projects that mirror real-world tasks (keeping a blog), or should I assign projects that are just for fun?”

    I’d lean towards fun.

    “Motivation: What’s the ideal source of motivation for kids learning to program? Is it the more intrinsic motivation stemming from solving low level problems and seeing the beauty in well-written code, or the more extrinsic motivation of ending up with a cool product they can show their friends?”

    Depends on the kid, but I’d lean towards “doing cool stuff”. The guys who care about internals also dig eye candy, while the guys who care about externals obviously also like eye candy :-)

    “Health: I tend to believe that in order to really get good at skills that take a huge amount of time and dedication, you basically have to get addicted to the activity for a while… is it possible for a kid to learn these skills without spending an unwholesome amount of time sitting at a computer screen? What are ways to get this knowledge to stick beyond just plain “programming a lot”?”

    Yes, but I’m afraid I’ll get way to Karate Kid/Mr. Miyagi on you if I enumerate them here. Sample: laundromat field trip, feeding birds, painting road stripes.

    Reply
  8. Dan

    I first learnt scheme and let me tell you I have appreciated any programming language I have learnt after that (even ADA and prolog to some extent).

    I don’t think it’s what language you use per say but what you do with it. I found learning bubble sort a bore, but implementing a simple tamagotchi (with ascii art) more interesting.

    Reply
  9. Chris Hunter

    Folks have already chimed in with the programming environments that I think have the most promise (Scratch, Hackety Hack and Mindstorms). I think the key is to have a quick payoff and be visual.

    I’d bet that there are activities that can done away from the computer that would help with programming. Here’s some examples:

    * Play algorithmic word games on a whiteboard (reverse a string, transform a sentence into pig latin, etc…)
    * Take a chess board and some checkers and demonstrate coordinate systems
    * “digitize” a black and white drawing by blowing it up on a copier and then laying Othello pieces ( or any black and white circles) over it to obtain pixels.

    Good luck with the exercise! We’ve got two almost five year olds who are just getting excited about reading so I know this stage if very close.

    Reply
  10. pmasiar

    In my experience (on my own son, 11), http://en.wikipedia.org/wiki/Game_maker is the best. It is completely GUI (no code writing), optimized for writing games and games only. For every object, you can assign actions into event slots. Actions have easy-to-remember icons (simpler than reading). Very intuitive.

    Kids love if they can tweak a game, change something, they understand why it does not look as cool as latest nintendo: because you can do it whatever you want.

    Sadly, it is Windows only, and Delphi-based. I am recruiting people interested in re-writing it on top of Pygame.

    Reply
  11. johny why

    i agree with Carmelyne Thompson: why teach them deprecated stuff they’ll have to unlearn later? start with good habits, and clean coding style. i don’t see why people think it’s somehow easier for a child to learn from a mess.

    i disagree with ms thompson when she says “moderation is key. You don’t really want want a prodigy” –why not? so the child won’t be “too smart”? or so the child won’t feel “uncomfortable” around less accomplished peers? the usa is terribly anti-intellectual. our schools are rated way down the list of achievement in international ratings. why perpetuate this dumbed-down culture? we should raise the standards for all kids. in the techno future, wiz-kids will get the kudos and the jobs. why hold them back?

    Reply
  12. johny why

    about “clean coding style” –i agree with SarahMei, “don’t get bogged down in syntax and indentation if you can avoid it” –which requires using a programming environment which is very forgiving of punctuation.

    but, i think it’s very important to teach clean LOGIC, and a clear flow of control. that’s different than punctuation.

    i don’t agree with rentzsch “important to fully acknowledge previous techniques, since they demonstrate design/architecture evolution” –kids don’t need to learn about “architecture evolution” when starting out. this is about learning how to program, not learning about the history of programming.

    i’ve worked with kids from infancy through 15 years, taught computer skills specifically to kids from age 15 through 85, a BA in education and child development, and i’ve programmed business software on Wall St.

    Reply
  13. Al Sweigart

    I’d like to mention a book I wrote called “Invent Your Own Computer Games with Python”. It’s freely available under a Creative Commons license.

    http://pythonbook.coffeeghost.net

    Personally I’m against using “kiddie” programming languages, but can understand why you wouldn’t want to jump into “public static void main(String[] args)” Java or other high level languages. But I think Python fits this perfectly: it’s simple enough to code in immediately, but scales up to the professional level.

    Each chapter in the book gives the complete source code for a simple game, and then teaches programming concepts from the example. I tried to put the practical side of programming first, instead of just teaching the language syntax.

    I hope you find it useful.

    Reply

Leave a Reply