It was our second lesson on coding without a computer. If you would like to see our first lesson check it out here.
Today, I had the learning carpet (a square carpet with a grid on it) out in the middle of the classroom. I told the students that we were going to write a simple algorithm using the following language to move a stuffed whale to a predetermined spot on the carpet using the following commands:
· FW – forward
· BW – backward
· LT90 – left turn 90 degrees
· RT – right turn 90 degrees
We were then going to test the algorithm to see if the program ran the way we intended it too and if it didn’t, we would debug the algorithm.
We started very easy with only having to write a few lines of code to get the whale where we wanted it to go. I then added little math counters as obstacles so it wouldn’t be a straight shot from point A to point B. After doing this activity several times together, it was time for them to try it on their own. We placed the whale on the carpet and then I placed a pink sticky note to where I wanted the whale to end up. I also added the math manipulatives as roadblocks that the whale would have to maneuver around.
Like most programmers, my students’ first attempts were not completely successful. This is when I introduced the word “debugging”. The kids loved coming up to the carpet with their lines of code and trying out what they had written. Out of 15 tries, we did not have a single student get it completely correct the first try. It was music to my ears when each child tried their code and realized that it was incorrect and replied with, “I need to go debug my code and try again.” This activity was challenging enough that my students had to debug their program, but not too challenging that they couldn’t debug it themselves.
My students learned key skills today in writing and debugging code without a computer or device. Students worked on problem solving, independent work and resilience. My students also felt a sense of accomplishment and satisfaction when they figured out how to get the whale to the pink sticky note. When the period came to an end, there was a lot of moaning and asking, “When are we going to play this again?” Little did they know that they were learning key skills in problem solving, directional language and being able to describe movement from one location to another using a grid map, which are all math curriculum expectations.