Cupcakes & Control Structures

Cupcakes & Control Structures

Two and a half weeks ago I stumbled upon CodeHS.com and my computer science teaching life was forever changed (hopefully I will be sharing more on this specific resource later).  I have made no secret of the fact that we have struggled this year.  Doing anything new for the first time is always challenging (and very scary).  I’ve struggled in finding a way for my students to learn the basics (without feeling like I was giving them content for “babies”) and also engaging them in the process.  I’m not sure what exactly I was thinking (rose colored glasses maybe??) when I thought I would be able to jump right into this arena/content area and teach like I’ve always taught…not struggling a bit with creating engaging lessons.  Nope.  Just, no.  The struggle is very real.

Personally, I’m of the opinion that we lack students (females specifically) exploring the tech industry career path because of the way we are teaching the content.  I am ENFP, ya’ll.  I’m probably the hardest personality type on the planet to engage.  I cannot LEARN (much less TEACH) from a sit behind desk/work silently on computer kind of approach.  I am sorry if this offends you.  I wanted to create a class AND culture that I would have wanted to be a part of when I was in high school.  I refused to teach in this sit and get kind of way when I took on this role.  It’s probably why I’ve struggled for 12 solid weeks.  Most of the resources and tools that are out there are either A)boring B)soooooo boring or C)targeted for “beginners” who are assumed to be approximately 7 years old.  I could not be more ecstatic to have stumbled upon CodeHS.

My students have been working through the basic lesson on Karel in the Introduction to Computer Science in Javascript.  We have covered basic control structures but after watching their progress, checking their code and listening to their conversations I felt like they needed a little more practice so I decided to dangle the metaphorical carrot: cupcakes.

While CodeHS allows my students to work at their own pace, naturally differentiating the curriculum and giving them exactly what they need, all the ladies in class have covered basic control structures at some point in their progress.  I took the notes from the documentation section in the Karel units and made a live programming problem for them to solve.

Click HERE to make a copy of the handout that students were given.

One problem that I saw my students making over and over and over again during their completion of CodeHS work was their inability to decompose the large problem.  I wanted to give them a challenge that would FORCE them to think about the problem in stages.

Now keep in mind that I have room full of freshman/sophomores with little to no programming background.  This is an entry level class and we have only been diving head first into actual written CODE (versus graphical) for about 2 1/2 weeks.  This is my disclaimer.

I wanted to do this activity with them so they could SEE the difference in while loops versus for loops and if versus if/else and use them in a practical setting.  Plus – cupcakes.  I’d do anything for a cupcake.

I went over decomposition again and each of the control structures I wanted them to practice using and turned them loose in the building.  (I only have 11 students in this particular class right now.)

It was interesting for me to watch how each group worked differently.  I had one group literally yanking the clipboard out of my hand before I could finish talking.  Another group sat in the classroom for at least 15 minutes talking through each problem before getting up and writing their “program”.  Other groups decomposed and discussed solutions as they walked the route to the cupcakes.

I intentionally added the obstacle of the stairs, forcing them to think through the code logically.

As we wrapped the up the class period, all the girls wrote a functional “program”, had a cupcake and made decent progress on their CodeHS lesson.  I even had one student say “OMG. I totally understand this now” after discussing why it would have made more sense to use a while frontIsClear loop than counting out 189 steps for a for loop.  I’m calling today a WIN ya’ll.  PS – If anyone was curious there are a total of 24 steps and I went up them more times that I could count.  #ShouldHaveWornMyFitBit

 

Are you using CodeHS?  Drop me a comment and let me know!  

Leave a Reply

Your email address will not be published. Required fields are marked *