Last year, I had an opportunity to work with the co-founder of WAAW Foundation, Dr. Unoma Okorafor, in developing a curriculum to teach women to learn programming to solve the top challenges in their communities. In February 2017, I joined the Dr. Unoma and her WAAW foundation team in Nigeria to pilot the curriculum via the foundation’s SheHacksAfrica program, a 3-week programming intensive for women in Africa.
The first cohort took place in Abuja, at a location that was well-equipped with computers, however, due to the energy crisis in Nigeria we experienced frequent power outages which made the use of “unplugged activities” critical for continuity of training.
Unplugged activities are performed without a computer. They are particularly useful in global training programs held in locations where technology resources may not always be available or updated. More importantly, I believe that understanding programming concepts without the crutch of computers tends to result in deeper understanding. It is also a great way to find common ground between innovators all over the world. I’ve taught the activity below in Africa as well as the United States and the results are similar, without a computer.
PROGRAMMING YOUR ROBOT
The basic “Program Your Robot” activity requires that one group of students take on the role of “programmer” and at least one student must take the role of the “robot.”
The task given to the SheHacks students was to program their “robot” (another student) to walk from one end of the room to the other.
The team had three rules to follow:
- The robot must be blindfolded before they begin their programming routine.
- The route, starting and ending location, could not be changed (note: we selected a route that included barriers such as furniture and turns)
- The last step must instruct the robot to sit in a chair located at the end of the route.
The students had a lot of fun completing the activity using basic programming structures (conditional statements, loops etc). Most of the teams began to generate a solution by walking the route themselves, trying things like placing one foot in directly in front of the other to count the steps & turns precisely. It was promising to see that most of the teams had an instinct for duplicating the problem, which is a significant first step to troubleshooting.
THE FINAL OUTCOME
Most teams were unable to make the robot walk from point A to point B due to furniture barriers and the right turn required to reach the endpoint. They learned the impact of relying on variable dependencies such as “shoe size”, gait, precise starting position and other factors. The one team that completed the goal did so by a very narrow margin; had their robot moved a few centimeters it would have hit the floor instead of the seat of the chair.
THE TRICK TO TROUBLESHOOTING YOUR “ROBOT”
The team’s ideas for improving their “programs” focused on determining a more accurate number of steps by measuring the room more precisely or determining shoe sizes. These are great ideas, but they add another dependency: a tape measure (we did not have one).
At the end of the activity, I suggested that that the girls take the following steps, then make a few adjustments to their programs:
- Carefully observe your environment Identify factors that are less variable – the room had square ceiling and floor tiles. Attention to detail is an essential skill for a programmer.
- Control the entry point – An X should mark the robot’s starting point. Many of their programs started with the robot standing “somewhere near” the starting point.
- Observe the current state and change it if necessary – Identify any factors that you can control to improve the success of the program. Is the robot blind or can it see?
No one ever said that the blindfold could not be removed. You control the computer.
PSEUDOCODE If not entryPoint then set entryPoint If robot.vision = false then Remove theBlindfold For x = 0 to tilesToTurn Move 1 Tile Turn right For y = to tilesToSeat Move 1 Tile Turn right Move -1 Tile Sit