I don’t know where to put this, maybe under AP Test Prep, or unit 5?? BUT reflecting on the create this year, I felt like students still weren’t getting this idea about abstraction. They seemed to get it in unit 3, but come the AP task time, they had forgotten why they would make separate algorithms and use abstraction.
SO… I was thinking of adding a lesson. There is a classic CS lesson that has a teacher act as a computer while individuals give “computer-like” directions but the teacher takes the directions VERY literally (much like a computer). Usually this is one of the first lessons a CS student might have, BUT, I was thinking you could do it in Unit 5 or before the AP test to talk about the need for separate algorithms and using abstraction. Here’s the big idea:
Do the activity: https://www.youtube.com/watch?v=XWe4iohhmIw
Ask students - if I wanted to make a peanut butter and banana sandwhich, how would this algorithm be the same, how would it be different? What about a nutella and banana, or even a ham/mayo sandwhich? Most of it is going to be the same, but there are small parts that need to be tweaked.
Have students break up their large PB&J algorithm into sub-algorithms that would be useful (opening jars, spreading peanut butter, spreading jelly, spreading mayo, opening bread, applying lunch meats, etc.). This gets at the “algorithm” component of the AP Task.
Look for ways to “manage complexity” by writing one function that has a parameter of “spreadableIngredient” that allows you to write one function for spreading mayo, PB, jelly, nutella, honey, etc. This could be an example of abstraction as needed for the AP task.
SO… that’s the big idea. I am interested in your feedback. What am I missing? What could be added? Does this help students? Confuse students? Where do I find “sunflower seed butter” really cheap?
I feel like we talk about each of these things through out the year, but I need to have a common experience to anchor students’ thinking “just in time” for the task. I think this might have legs.