Marble Mazes and Programming

Marble mazes are a staple in the world of constructive play.  For reasons that I'm guessing are as deep in the genome as the reasons we like rhythms, melodies, and Angry Birds,  we like to watch a ball bounce down some sort of landscape, watching how the laws of physics play with our creation.  But why? Here are my conjectures.

1. It is a way to experiment with and understand our most constant frenemy,  gravity.  Just how much can we alter the path of a falling object before it ends up where it is going to end up (at least for the observable present).  Just how much do the angles and materials and sizes of things matter?  Is falling inevitable? How much up can we get out of some down? 


This marble maze is in the Holyoke Children's Museum, in Holyoke, Massachusetts.

This marble maze is in the Holyoke Children's Museum, in Holyoke, Massachusetts.

I also see a lot of parallels between building a marble maze and programming.   If we are engineering a bit of software with a particular goal in mind, then we devise a set of instructions within the limits of a code, and see if we can get the result we are looking for. (E.g. I want to make the ball jump and then land and keep rolling)  If we are tinkering with programming we play with different sets of instructions, and our observations of the results help us to discover and gain fluency with the logic of the language.   We watch the ball bounce, roll, accelerate and decelerate and it teaches us about the structure of the physical world and the rules it sticks to.  

If we have a certain outcome in mind, and it doesn't work, we engage in the debugging process - finding the unknown mistake in our logic that is preventing things from ending up as we'd hoped.  E.g. "Oh, it doesn't make it over the gap unless it is going fast doesn't go fast enough unless it is rolling for a few seconds in one direction...if I want it to roll in that direction, I will need to place more pieces here.  Ok that worked!"