Over the past year I’ve taught about a dozen sessions of Ruby language or Ruby on Rails programming classes. I’ve been using a combination of presentation, live coding demonstration, follow along with irb (Ruby’s interactive scripting environment) and test-first teaching exercises. I’ve reflected on what works well and experimented with curriculum and teaching style modifications for the sections where students struggled. I’ve found a sequence which works very effectively. I believe it could be applied to teaching any programming language, and perhaps to teaching anything.

  1. Conceptual Overview A presentation of the concept: why it is important, what it can do, how it works. How it fits into the bigger picture (if applicable). Pictures and diagrams are great here.
  2. Experimentation (Play) My goal in this section is to create a feeling of play… at best, with grown-ups, I think I’ve achieved a sense of experimentation or, perhaps, what the Talent Code calls “deep practice”
  3. Demonstration of a Real-World Example A live coding demonstration that solves a real problem. I often use this as an opportunity to test-drive the example, which illustrates the concept from two angles: the test (expectation) and implementation.
  4. Simple hands-on exercise Test first teaching examples where the student is given a test that fails and they have to apply what they just learned to write code and make the test pass.

This was the context of my talk tonight at the East Bay Ruby Meetup. I talked about teaching methodologies, demonstrated a test-first exercise, then talked about moving on to test-driven development.

Slides posted:

What do you think?