Friday, February 17, 2017

CS Teacher First: I made my own lesson!

I suppose this is not the first lesson I have made for my CS classes but it was by-far the most extensive one I had made myself.  Here is how it went:

In a previous code.org lesson, I had the class incrementally develop a ColorSleuth App.  I really liked the format of the lesson.  It was a bit of brainstorming, it was a bit of independent work, a bit of full-class work, and then students could decide how to enhance the app even further.  I liked the discussions that took place and the problem solving.  Students liked making a game (they all love games)!

I was looking for a similar project but couldn't really adapt anything from the code.org progression of CSP to fit my needs.  I wanted students to get comfortable with using arrays, having keyboard data, and also testing out their code.  Maybe I am the only person who programs with an obnoxious amount of "console.log" statements, but to me, console.log's are to computer science as checking your answer is to math.  YET many of my students would code up a huge section of code, run it, and then get mad when it didn't work.  I wanted students to be able to identify how/when to test things.

While brainstorming for this project, I knew I wanted to figure out a way to make the end project a game.  Initially I thought about doing a "memory" game which would have the added benefit of allowing students to find images that they liked themselves.  The UI seemed a little clunky for something like that, and I wasn't exactly sure how I would use arrays, but I would like to re-visit this idea a little later - or maybe challenge a student to figure it out.

After searching around, I decided to try and make a "Simon" type game.  I thought of using colors, but wanted to incorporate the keyboard element so I changed it to arrows.  I wanted a game where arrows would flash on the screen and you had to repeat that sequence with the keyboard.  When I showed this idea to students, they thought of it more as DDR, which totally worked too.

I was able to get the UI set up, and the arrays in place and understood how I could code up the logic.  It seemed so close to being "there" but animating was a bit more than I was ready for.  Thankfully I was also able to get some support from GT at code.org to help me understand the "setTimeout" command and then applied it into the code.

THEN I took it to the students...

No comments:

Post a Comment