Friday, July 4, 2014

Computer programming intro (5th grade)

This is an outline of a once-a-week introduction to computer programming for Jin's school.

Goal of the course:
  1. Encourage the kids interest and curiosity about programming
  2. Learn the basic concepts of programming using Pencilcode (see below)
  3. Play with the fundamentals of coordinate geometry
  4. Practice using precise language, working in pairs
  5. Have fun!

  • Background manipulations: create, test, launch, share a program
  • Turtle movement commands (fd, bk, lt, rt)
  • Drawing commands (pen, dot)
  • Loops and iteration (for)
  • Input and output
  • Functions and recursion
  • Debugging
Structure of typical session
  1. Students get started with a "Fix this program" challenge or sharing code they found from other pencilcode users (5 -10 minutes) 
  2. Gather in a group, Teacher introduces an example program (usually short, sometimes very short)
  3. Split into pairs and examine the example (5-10 minutes, depending on complexity of the example)
  4. Regroup and discuss: what did we see? what was old that we already know, what was new? what questions do we have? what could we do with the new tool/technique? (10 minutes)
  5. Split again and work on challenge task using the new concept (10-30 minutes)
  6. Regroup, show and share: what have we done, how many different ways were there to meet the challenge, what else could we have done? (10 minutes)
  7. Open experimentation/investigation/exploration (teacher will have some go-to activities)
Homework/Course Project
Ideally, it would be great if each student could write a substantial program of their own.  To use this as homework would require customizing for each student based on what they are trying to develop, but there are some modules that will probably be standard:
  1. Select topic and write a description of what you want it to do
  2. Design and draw the figures/pieces in the program
  3. Define their movement
  4. Define their interaction
  5. Animate
  6. Debug
For the first week, at least, the homework will also include looking for interesting examples from other pencilcode users and bringing those to share with the other students.

Course outline
My intention is to follow the examples in this pencilcode introduction book. I don't know the right pace for the kids, so we can customize as we go along.


  1. Some ideas for projects
    - give an animated presentation
    - play a song accompanied by animated musical instruments
    - build a simple game (number cross-out, fruit ninja with Thai fruits, whack-a-mole)
    - draw a self-protrait
    - simulate traffic jams

    I don't know if any of these are reasonable for this age, maybe all are a bit ambitious.

    1. other ideas:
      - making a piano keyboard.
      - building a little drawing program
      - animate a Vi Hart video, eg story of wind and mr ug

  2. More sources of activities and tutorial material: