Blog Post

Unplugged Activity Idea: Color Coding

Are you looking for a quick, unplugged activity to check for understanding or misconceptions of programming concepts? Try using selective highlighting with snippets of code!

Highlighters
Image Source: https://pxhere.com/en/photo/759979

We have block periods once a week in our school. On block days, my Upper School students have computer science for one hour and twenty-five minutes. I don’t like for the students to stare at a screen for more than about thirty minutes, and sometimes it is challenging to think of fresh unplugged activities to meet our objectives while we work through the curriculum.

One activity my Upper School students really enjoy is selectively highlighting a printed piece of code with highlighters. This activity is adaptable for students in elementary and middle school. I simply give students a printed piece of code and ask them to highlight specific pieces of code in different colors. For example, we recently learned how to create user-defined functions in Python. I found some Python code for a Battleship game and printed it out. The students had to read carefully through the code to understand how it worked. Then I asked them to highlight the function calls only in a specific color (yellow).

Highlighting

 

More Color Coding

If I want to challenge students, I will find a piece of code that is a bit more complex than what we have been learning or ask students to try to read code in a language we have not learned. This helps them begin to make connections and comparisons across languages.

If I want to check for understanding about a certain concept, I will find some code with frequent usage of that concept (loops, conditionals, etc.). Sometimes I include a question or two asking students to predict the output or identify an error.

If I want students to collaborate, I will ask them to submit one highlighted piece of code as a group. With this approach, students have to compare their individual highlighted pieces and talk through discrepancies to reach consensus.

The same results might be achieved by asking students to annotate their code with comments, but with selective highlighting students can visually separate elements and identify distinct patterns. It also helps me as the teacher assess understanding with a quick glance.

Before I tried this activity, I purchased a set of erasable highlighters from our school bookstore. They were a HUGE hit, and extremely useful as students navigate the code. Who knew you could erase highlighter?!

There are many great sources to find code snippets online. I personally love RepLit for Python. Students can even highlight each other’s programs and make suggestions. This technique helps them recognize different approaches for constructing programs to achieve the same result.

Have you tried an unplugged activity like this with your students? What would you suggest for other Computer Science teachers?

 

Jenn Vermillion is the Director of Innovative Learning at St. Catherine’s School, an independent school for girls age 3 through grade 12 in Richmond, VA. She teaches an introduction to computer science course for students in grades 9-12 and an 8th grade Creative Technologies course. She also coaches a 4th grade Robotics team and coordinates school-wide professional development. Jenn welcomes your comments and questions at jvermillion@st.catherines.org.