Today’s Stage 4 Lesson takes us from the Algorithm (the directions) to the symbolic language which is the Program or Coding.
Code.org provides the following that I’ve screenshot, as way of an example. The Algorithm is on the right using words. The Program or Coding is on the left with the symbols: arrows, squiggly lines etc. The task is to provide the program in order to draw a picture on graph paper.
Here are examples of programs we wrote. Note the original drawings, the Program, and the attempt to follow the program by someone else. (I call the attempt a “replication” but I don’t know if that is the correct term. It’s so obvious to me that I’m operating in a new medium as I struggle to find the correct words to even blog about the experience.)
Here are some more examples. Click to enlarge for a closer look.
During New Year celebrations, it’s important in the Chinese culture to not argue with your family members as it will bring bad luck and disharmony in the new year. I would not advise you to try this exercise during the New Year week. The exercise appears easy but there are many ways that you can mess up. There was a lot of arguing and debugging going on!
In order to make the program a bit easier, we could invent a short-cut in our program. For example, instead of (—> —> —>) which means move ahead 3 times, we could create a short-cut that might look like (3 —>) The is now called a FUNCTION. The 3 is the number that defines the parameters of the Function. So, the number is called the PARAMETER.
In summary (as defined by Code.org):
Algorithm— a series of instructions to accomplish a task
Program— algorithms put into symbolic language. (I think the word “Code” would be a synonym for Program?)
Coding— transforming actions into symbolic language
Debugging–finding and fixing problems in code
Function–a piece of code that can be called over and over
Parameters–extra pieces of information that you can pass into a function to customize it
The unplugged activities are simple activities in that they are just plain paper & pencil activities. However, behind the activities are very big concepts that even I have to re-visit over and over in order to make clear in my mind what they are. The “simple” activities give us all something concrete to attach the concepts to and help us to remember what the concepts mean.
In reality, the “simple” activities are not easy to do well. You have to be focussed, careful, and to check your work. If not, you end up having a lot of hiccups and a lot of arguments 😉 .
Happy programming! 🙂