Final Product

To help narrow down the possible mechanical systems and variable representations, I chose to focus on one specific problem to solve using a mechanical programming language: an averaging problem. My current prototype, dubbed "Trackibles," is a mechanical programming language that allows you to build a mechanism that solves the averaging problem.

The averaging problem was chosen because it is a relatively basic problem and the algorithm consists of commands that most beginning programmers would learn early. But it requires the programmers to use a set of these already learned commands and "plans" in concert and merge them into a working program.

count=0
input=0
sum=0
while input < 5:
    input = int(raw_input())
    if input < 5:
        sum = sum + input
        count = count + 1
average = sum/count

The learning tool consists of a track. The track's structure mirrors a while loop with an if-else statement inside of the loop. To run the program, a motorized mine cart is placed on the track. The mine-cart can only move, it has no other capabilities.

Trackibles Prototype

Picture of the track. You can see the looping flow structure and the embedded if-else. Also pictured is the base of the mine cart

When the mine cart reaches forks in the track, the direction of the cart is determined by the weight of the contents of the mine cart. If the contents are too heavy (over 5 "pounds") the cart will take the outer-most track.

If you look at the algorithm, there are basically three other snippets of code (orplans) that are important: input = int(rawinput()) (or _getting input, sum = sum + input} (or accumulation of the sum) and count = count + 1 (or incrementing the counter).

These three snippets are represented by three mechanisms that can be placed on the track. The getting input mechanism drops a widget into the mine cart with a weight between 1–3 pounds. The accumulation mechanism makes the cart deposit all of its contents into a common scale, which holds all of the deposited widgets and show its weight. The incrementing mechanism increments a counter.

Trackibles GUI Prototype

To simulate the threshold value, at a random time, a "defective" widget will be dropped into the mine cart via the getting input mechanism. The defective widgets weigh 10 pounds, which is well over the 5 pound threshold for the switches.

To use the prototype, students are told to solve the averaging the problem by placing the 3 mechanisms on the track.

← back to Grasping Programming