Report from the field on my ongoing adventure teaching Ruby and Shoes to a 4th/5th grade class of 28 students. Here’s a summary of last week’s class:

I started with a demonstration of red, green, blue color: 3 flashlights with colored gels over the front, mixing red + green to get yellow , then add blue to get white. I talked about how last week we made Shoes draw a colored rectangle on the screen. The screen is made up of lots of little dots. Does any one know what they are called? one hand, correct answer: pixels. Then I described how each pixel is a little light. A pixel was a single light in the old days when all monitors were black and white. Color screens, which are on most computers today, have pixels which each have three little lights. When we make colors on the computer, we are making colors with light, which is quite different than making colors with paint. Then we turned out all the lights and it got really fun.

I showed the flashlight with the blue gel covering the front and splashed a blue light on the ceiling. Then I took the cover off and showed how the flashlight emits white light, but it comes comes out blue when I put the blue gel over it. I asked them first what did they think happened that made a white light come out as a blue light when I put the blue plastic over the front of the flashlight? (lots of theories of magical color transformation and after a few tries, I supplied to correct answer which is that white light contains all of the colors and when it hits the blue plastic every color except blue bounces off and blue is the only color that gets through.)

When you mix red + green paint, what do you get? (several tries before one of them got the right answer: brown) I told them that light mixes differently than paint. We call mixing light “additive” and when you you add the colors together they get brighter, as opposed to subtractive color with paint where mixing them makes the colors darker. Then with the help of my two assistants we demonstrated color mixing with light (See on understanding rgb color for complete details.) It was way cool.

Then we moved on to the programming exercise which was about “computer generated art” making a loop with shapes that have random color, position and size. Fewer setup problems this time. I had 3 extra computers set up and still ended short one and ended up once again abandoning my idea of a coding demo yet again since I gave the “teacher” computer to a pair of students. I ended up writing code snippets on the board and spending more time with each group of 2-3 kids helping debug syntax errors and giving little impromptu explanations of what was going on.

I’m torn between how much time to spend explaining concepts (since they are always antsy to get onto the computers) and how much to let them wing it (which then is frustrating to them because they don’t know the rules. I would welcome suggestions from anyone on the right balance here. I suspect different people just learn differently, but what’s the best way to manage that in a classroom full of kids?

At the end of the class I asked them to raise hands to answer: who thought it was fun? (about 2/3s of the class) who thought it was frustrating? (maybe 40%) who thought it was fun even though it was frustrating (about 1/3). I really don’t know what impact these classes are having, but I will forge ahead nonetheless. The teacher seems to think the lessons are great and the kids report having more fun than it looks like they are having. I do feel like about half the class is starting to “get it.” Not sure if that is a lot or very few after 1.5 hours of programming experience.

I was still following my original lesson plan. Even though most of the kids haven’t gotten through the final exercise, I think I’ll switch it up next week to add some interactivity.

The Shoes list and whytheluckystiff himself have been very responsive in answering my technical questions, and everyone on those lists and Railsbridge have provided encouragement that really makes a difference.

Someone from the lists gave me the very awesome advice of training some of the kids to help with the lessons. I did this after school the day before the class with two of the fifth graders and it made a huge difference. They ran around and helped other kids debug their apps and I was freed up to spend more time on impromptu theory lessons and writing additional examples on the whiteboard. It was a great experience for the two TAs, and made the whole class more fun for me and the other kids.

2 thoughts on “teaching kids to code: lesson #2

  1. very well done, some of your methods of teaching were quite good, made me want to join the class myself lol, good post. cant w8 to read the other parts.

What do you think?