Forever, Until Done

I’ve been noticing interesting uses, or misuses, of Scratch’s ‘forever’ block.  I applaud Scratch for it’s fail soft policy and understanding the desire of 10 year olds to test things, especially to their limits.

screen-shot-2017-01-12-at-5-52-13-am

Nested forever loops will get the job done

The ‘forever’ block seems pretty self-explanatory and perhaps that means I don’t introduce it properly. My students tend to use it in 3 ways: repeating actions, for event listeners and for looping background music.

screen-shot-2017-01-12-at-6-18-45-am

Repeating an action forever

I introduce the forever block after introducing the repeat block.  Once they know about it, there is no going back!

In many games you wait for a certain action to happen to respond to it. One way to do that is to code some ‘if statements’ and set them in a forever loop, like an event listener in other coding languages.

screen-shot-2017-01-12-at-6-15-12-am

Listening for the win condition

Many, many students want use it for play background music for their games.

screen-shot-2017-01-12-at-5-54-27-am

Two dance tracks in a forever loop.  Both seem to work, together.

And I think it is with the ‘play sound’ block where things gets confusing.  I am a proponent of ‘play sound until done’ in a forever loop, and the Scratch Wiki concurs, but it seems to work without the ‘until done’ if it is the only thing in the forever loop.

screen-shot-2017-01-12-at-6-18-55-am

Even without the ‘until done’ this code plays the whole song in an infinite loop

Other things I’ve seen makes me wonder. Why did the Scratcher feel the need to use the forever block?  Was some other code interfering with their action?

screen-shot-2017-01-12-at-5-57-33-am

What would cause the need for show in a forever loop?

Or are they just testing things to see what works and what fails.

screen-shot-2017-01-12-at-5-52-59-am

Forever and ever and ever and ever, just in case repeating 10 to the power of 109 times isn’t enough!

Thanks Scratch for not failing them.

A New Start

My two Code Clubs have started up again. There are 20 students and 2 high school volunteers for each club.  The first meeting has happened. Students learned about Scratch, had fun and I’m excited for both clubs.

This is my 3rd year. It’s session #6 & #7 of Code Club for 4th graders in my city. I know all the students from my school but only 2 of the students from the other side of town.

One thing I worry about, now that I have been coaching Code Club and teaching Scratch to elementary students for three years, is forgetting what it is like not to know how to program in Scratch, not to know what a Sprite is or know that the Stage has no movement blocks, etc.  I don’t want to assume that they know what I know and I want to present concepts that will be relevant to what they do understand. (I realize this concern is not unique in the teaching profession).

I have on the calendar for the first session of Code Club: “First meeting – Rules & Goals, Intro to Scratch”.  So I decided to morph the Rules & Goals and include a bit of the first step in thinking like a programmer.  Defining rules & goals is a big part of what a programmer really does.  I tried framing the rules in pseudo-programming language with the students as well:  If the day is Wednesday and the second bell rings, then it is time for Code Club.  When you open up Scratch, forever have fun.  I’m not sure I got my point across.

screen-shot-2016-10-11-at-2-42-41-pm

I presented the Maze game to Wednesday’s club because I knew they had used Scratch before as 3rd graders. They struggled a bit.

screen-shot-2016-10-11-at-2-44-01-pm

Most of them were able to get their Sprites to move around using arrow keys and set up the maze background.  Some were able to get the conditional sensing color code working.

screen-shot-2016-10-11-at-2-47-12-pm

Puff magic, a working maze game

And this one below added a squirrel that spins around the screen changing colors of the hero. Cool.

On Thursday I introduced Scratch concepts to 3rd & 4th grade programming newbies and blew their minds with the possibilities Scratch offers through simple blocks of code. The energy was thrilling and left me pumped.

screen-shot-2016-10-11-at-5-22-51-pmAfter introducing the same concepts of defining rules in code, (and Code Club) the first thing we tried was Motion blocks (ie moving a Sprite with the spacebar). And then we added Looks (ie change color).

 

screen-shot-2016-10-11-at-5-18-03-pm

screen-shot-2016-10-11-at-5-26-41-pmAnd finally, the awesome: Sounds forever!

screen-shot-2016-10-11-at-5-20-03-pm

In reviewing all of Thursday’s projects, I found those kids had some serious fun with Scratch last week!

I can tell I haven’t blogged in a while and I struggled to write this coherently and in a timely fashion.

A New Plan

(I know, 3 blogs in one week.  Bear with me. This one is short)

I spent some time over the weekend hashing out the project plan and learning objectives for my two code clubs.  I feel better with a plan and ideas in mind and on paper.

I also revised my expectations for last week.  My learning objective for the students last week was to get to know Scratch and the code blocks that include Events, Motion, Looks and Sound.  I have to remember there’s also a new costume editor they will have to get a feel for as well as the notion of the Stage and Sprites and how they are different.  That’s actually a lot. I think the majority of the students have got a grasp on some of those concepts. (If they haven’t forgotten them in the meantime)

One student came up to me today and said, “I wish Code Club was everyday!!” What an awesome sentiment.

This week I’d like to focus on Initial Conditions, Conditionals and Sensing blocks. To that end, I’ve updated the maze project to use for Scratch 2.0. And we will try it out tomorrow.

Screen Shot 2015-10-12 at 8.39.24 AM Screen Shot 2015-10-12 at 8.57.42 AM

Scratch 2 Maze Project – Google Docs

I wonder if I’ll have time to mention the “Think like a Programmer” ideas of make one change, test it, make another change, test it?

Then next week both clubs can work on the same project.