Health-o-meter Sprite and Stamping

Last week I introduced my Health-o-meter sprite to the students.  It’s based on the Health Meter sprite Colleen Lewis, the professor of the Scratch Programming MOOC on edX, shared in the class.  I noticed a couple of students adding the sprite to their project or making their own version.  It will be interesting to see it in action.

Health-o-meter script and costumes

Health-o-meter script and costumes

In general, Code Club went well again last week.  Students are making progress on their individual projects and the number of issues that crop up are not overwhelming.

Although one student’s query had Alex, my high school volunteer, and I stumped.  The student is making a paint program similar to Paint Box, a Code Club World project we worked on earlier in the term.  She has taken the basic project and is adding more colors and features to it.  One addition she is working on is a stamp tool.  She has drawn a few sprites: rainbow, present, balloon, lightning and wants the user to be able to place copies of the stamp on their drawing. Scratch 1.4 has a stamp block in the Pen menu but she was having trouble getting it to work.  Alex and I both looked for help on Scratch Wiki, but were not successful in getting any code to work in the moment.

I spent some time today researching and testing some code and I think I have a couple of different algorithms for her to try tomorrow.  I did find a good resource through the Scratch Wiki – a Stamping tutorial and explanation, which helped get me started.

One way to work the stamp tool would be to have the sprite “stamp” itself in a random location on the stage.  Here I have a ball sprite and when the sprite is clicked, a copy of the sprite will appear on the stage in a random position.

stamp tool, version 1 -random placement

stamp tool, version 1 -random placement

That’s okay, but I’m sure the “painter” would like to pick the place where the stamp will go.  So I worked again to improve my solution.  Here the ball sprite moves with the mouse when clicked.  When the painter presses the “s” key, it makes a stamp of itself and the sprite returns to its original position on the toolbar.

Screen Shot 2015-03-24 at 7.49.02 PM

Stamp tool, version 2 – click and press “s”

That is better.  Now, though, I have to instruct the “painter” to press the “s” key to stamp. So I took one more try at the code.

Stamp tool, version 3 - on click

Stamp tool, version 3 – on click

This seems to work in my simple case, but I know in her paint program a lot of drawing happens with mouse down, for example, the pencil goes to the mouse-pointer. She will have to try it and test it.

Screen Shot 2015-03-24 at 7.58.06 PM

Something else could go in the repeat until – like the sprite could say “click to place”.  As always with code – different algorithms can give similar results.  One way may more pleasing to the coder than another.

I can’t believe there is only two more weeks of Code Club.  Students will need to finish up tomorrow and we all need to prepare for Showcase #2.

Advertisements

How to Think like a Programmer

Yesterday was our second Code Club meeting, our second Hour of Code, if you will. It went well. Kids did great. It’s incredible, actually, how much we got accomplished.  I have to remember that, because I want even more and I think the students’ expectations are at least as high as mine.

I had been thinking about what I wanted to introduce this week since Code Club ended last week. What could I introduce at this point that was relevant to where they are in this journey? Too soon to talk about initial conditions.  They’re not ready for elements of game design (although a number of them would tell you otherwise). Explaining what an algorithm is was a definite possibility, but I needed some guidance. So I looked through the Computing at School Primary Guide for some help.

The guide explains how primary teachers can get started with the new curriculum and provides many pointers to excellent resources and ideas for building an innovative and exciting curriculum.

I recommend checking out CAS (Computing as School) for anyone interested in teaching computer science in elementary grades. From there I developed my topic for week 2:  Think like a Programmer  with two key points.  The first is that computer language is different from human language.  The second point is that to think like a computer programmer you need to know how to do 3 things: 1) how write clear algorithms, 2) how to debug, and 3) how to test your program.  I tell you, when I opened with, “Today I’m going to tell you how to think like a programmer”,  I got 100% attention from a whole bunch of my coders.  I think they even forgot about their goldfish crackers and apple slices for a minute. It was like I was revealing some mystery of life.

felixherbert_screenshot

Felix-and-Herbert – first project from Code Club

I only talked for 10 minutes because I wanted them to have a good 45-50 minutes to tackle our first learning project from Code Club: Felix and Herbert.  I had a printed project packet for each student.  They were to go through the project step by step as best they could.  This is a creative bunch and many whined a bit about having to follow the directions precisely.  I told them these projects would show them how to do things they might want to include in their own programs later.  For a while I wasn’t sure anyone was going to even finish the project. I didn’t print the projects in color so we spent a good bit of time figuring out under which menu button each code block was. Some things were a bit different in our version. Also saving the project can be an issue in our network set up. But it was all productive learning.

scratch menu

Scratch 1.4 menu – color coded

I had a former student email me with an interest in helping out with code club.  I remember when he was in elementary school here.  He was in the chess club I ran back then and I believe he wrote a persuasive essay in 5th grade about why our school needed more, and better, computers. He’s a high school senior now and at least a head taller than me (I’m only slightly taller than a 4th grader). When I introduced him to the students their comment back to me was, “no offense Mrs. Pollard, but you’re old.”  Well, yes I am. He was a great help with the students even though he didn’t know the programming language Scratch.  With three of us, my former student, the snack-bringing parent who stayed and helped, and myself, we managed to field most issues and a number of the students actually finished the project.  Some were even able to spend a minute customizing it.  Some didn’t quite finish.  A couple of students wanted to take the packet home.

The end of Code Club came so quickly, I didn’t have time to check-in with each student.  A downside of having such a large group and wanting to accomplish so much.