A set of Cuisinaire rods: multicolored wooden rods of increasing length arranged in a staircase-like pattern

Play

In Registrar part 1 and part 2, you practiced working with extreme care and diligence: hunting down hidden assumptions, fixing and testing subtle problems, and striving for precise correctness in your code. Today’s activity focuses on another kind of work, almost the opposite yet equally important: play.

This kind of learning has been lurking throughout this course. The Critters activity says:

Think of how little children learn to talk and walk. They don’t take classes for it. They don’t have assignments and deadlines. They don’t get graded on it. They mess around and explore without any clear goal and make lots of mistakes and just keep going. They play. And it works.

Maria Montessori summed this up in one sentence:

Play is the work of the child.

It is not just the child. We adults forget this way of learning at our peril: our human brains have evolved over millions of years to learn by playing. It’s how all our brains work — adult brains included. Our natural curiosity seeks out the learning we need long before we have any chance of knowing why we need it. Curiosity and play have been educating human beings since long before language even existed, much less schools.

Play is almost magical in its effectiveness for learning. Yet we adults constantly try to force our brains to learn by not playing, by tackling Real Problems, by acting out rituals of Seriousness and Achievement and chasing an imaginary good grade even when nobody is assigning grades.

The very best engineers, however, remember how to play. Yes, they study carefully and think precisely and employ rigorous methods…sometimes. They also tinker and experiment and fiddle around and try unfamiliar things just to try them and make silly creations just because it’s fun. This — not assignments, not classes, not trainings, not degrees and certifications, but this kind of play — is the bedrock of lifelong learning and deep expertise.

The best software developers have the ability to be both precise and playful, and know when and how to switch between (and mix!) those two modes of working.

There is an enormous amount of science demonstrating the deep connection and overlap between play and learning. Just a few examples:

  • Rats raised in environments with many opportunities to play have thicker cerebral cortices.
  • Conversely, rats deprived of unrestricted play show impaired cognitive skills.
  • Social play and exploration causes neurogenesis (i.e., your brain literally grows).

The principle is: play is rehearsal for the unexpected. Animals and humans play so they explore behavior in safe conditions where they can lose control and learn how to improvise and recover. Play reduces anxiety and stress; it develops problem-solving, flexibility, and creativity. All of those things are core qualities of a good student — and a good software developer!

We COMP 127 instructors are not just making this up. Here are a few references:

Today your goal is to practice playing. There is no correct endpoint. There is no success criterion. Whatever you end up doing is correct. The only thing that’s wrong is doing nothing!

In today’s starter code, you’ll find four classes with main methods:

  • dragon.Dragon
  • flame.Flame
  • textanimation.TextAnimationApp
  • warp.ImageWarp

Run each of those main methods. See what each does. Then pick one (or more) that you like and change something. Experiment. See what variations you can come up with. See how it changes. See how it breaks.

Some hints to get you started exploring:

  • Run the code often.
  • Change just one thing at a time. Do tiny experiments.
  • Look for numbers sprinkled through the code. Try changing just one number and see what happens.
  • Look for hints in the comments about things you can try.
  • It’s OK if you don’t understand the code! You can still tinker with what you don’t understand. Very often, you can understand it by tinkering with it.
  • Don’t worry about what you are learning. That will only be clear in hindsight! If it’s cool, you’re on a good track. If it’s surprising, you’re on a good track. If you totally broke it, you’re probably on a good track!
  • If you completely break one of the classes, you can always use Git to recover the original version. Open GitHub Desktop, right-click on a file, and choose “Discard Changes.”

That’s it. Jump in! Play!