Friday, October 4, 2013

PB & J Program

After several weeks of programming with the EV3 robots, it was time to conduct the classic PB & J Program Demonstration. The lesson was wildly successful. One particularly illustrative example of programming sequencing errors is shown in the images below.


The student did not specify the size of the slices of bread and therefore one is a cocktail size slice and the other is normal sandwich size. In addition, the student did not specify how much peanut butter or jelly to use. Finally, while it is not numbered, the last statement of the program suggests that "you can toast the pieces of bread." Certainly!

The rich discussion after the demonstration included comments such as: the robot does exactly what you tell it to do; our robots will not interpret directions; any errors that occur are a result of the programmer's program; also the errors are compounded, meaning that as more errors occur the final result is further off from the expected result. 

The basic idea that the programs need to provide very specific directions in order to achieve the desired result was grasped quite easily by students. In addition, the idea that it is a good idea to write and test one piece/task at a time, rather than the entire program. This makes it much easier to debug and problem solve. 

The demo took place during the first period of the day on Friday. What a way to begin the last day of the week. So much fun! 

Disclaimer: no properly functioning toasters were harmed during this demonstration. This toaster toasted only one side of the bread and the lever did not hold the bread down anymore. My son and I tried to take it apart and fix it, but my wife had already purchased another toaster at a garage sale. Isabel's PB & J program was the only one that mentioned a toaster. Perfect!



No comments:

Post a Comment