Poetry Generator

While planning Wednesday’s Code Club during a snow day on Tuesday I came across the Code Club World project Ada’s Poetry Generator.  This is a new project for me and I liked the way it introduced and used lists.   Arrays and lists are extremely important data structures in programming – right up there with loops and variables. I’ve never introduced lists in Scratch before.  I also liked how this project wasn’t a game but had the potential for a lot of creativity and fun.

I mocked up a project with Scratch Cat instead of Ada Lovelace.  (I did talk briefly about Ada when introducing the project.)

Screen Shot 2017-03-16 at 8.45.33 PM

I added some “talking” animation to Scratch Cat by duplicating costumes and morphing the mouth into different shapes.  Then coding the costumes to change when the poem is “spoken”

Some students whined a bit about poetry and not a game but I ignored that because I knew they’d like it once they figured it out.  I’m hoping someone chooses to make a MadLib or something similar for the final project.  If not, I may see if we can use this in some language arts project.

Here are some nice examples:

Screen Shot 2017-03-16 at 9.00.09 PM

Computer generating poetry with lists

Screen Shot 2017-03-16 at 9.06.15 PM

This coder really liked gluteus maximus, and unhelpful list naming conventions.

Screen Shot 2017-03-16 at 9.01.11 PM

Awesome animated mouth

This coder is my animator to be.  He drew and animated the PacMan and Ghost being eaten costumes… then he coded the poem in the last few minutes.

Screen Shot 2017-03-16 at 9.02.52 PM

Future animator

These two below took the morphing a bit to the extreme but the coding (and poetry) is well done:

Screen Shot 2017-03-16 at 8.56.52 PMScreen Shot 2017-03-16 at 9.15.40 PM

I enjoyed reading all the funny randomly generated poems that the students created.  I was glad I choose this project for my Code Club.

Advertisements

Game State – Game Loop

This week we tried out Code Club World’s Desert Race project.  One Code Club member used this for his independent project last round, so we had one expert.  We used his final project to demo the game. Screen Shot 2017-03-12 at 11.20.11 AM

Desert Race is a fairly simple 2-person race to the finish.  The main concept in this game is setting a game state variable to control the action. In event driven games is important to control the allowable events – like when to start. And we don’t want anyone to cheat by starting before the start signal.  Setting up a game state variable, ‘racing’, like a Boolean with 0 (not racing) and 1 (racing) is the concept I was hoping they would take in while making a cool two person game.

Defining a Boolean for game state is the first step to building a Game Loop that programmers use when creating more complex games.

Scratch Wiki also refers to it here: https://wiki.scratch.mit.edu/wiki/Game_Loop.

My fourth graders may not ever get to that level of programming here in Code Club, but it is a powerful idea. I have used this programming technique in (non-Scratch) games I’ve created in the past and found it useful.

I also made a quick version of the project adding a bit of 3D perspective with my Space Race project.  The racers (cat and dog) get smaller as they head to be the first to reach the planet.

Screen Shot 2017-03-12 at 11.26.57 AM

The students made some nice games. Many customized their Sprites and a couple recorded their own “win” sounds.

This one below has some almost imperceivable pitfalls that send you backwards (the opposite of a booster).

At the end of the day a few students asked to be able to keep working on the Desert Race project for next week -they needed more time and were enjoying the project.  I think I’ll let them, but I’ll need another project for those who finished or want to move on.  So I asked one of the two girls in the Club what she would like to work on and she said, how about making an ebook.  I asked if she meant like an animated story?  I’d love to focus on animation more – there are some great techniques to making things look like they are moving – I love Tumbling Santa.  Also, I’m thinking I need to show her Bubble103’s Scratch projects.  Maybe she wants to make a tutorial (nonfiction ebook).  There are a lot of How To projects on the Scratch site.  I’m considering these two options for next week.

Also awesome this week was this project:

Screen Shot 2017-03-12 at 12.18.11 PM.png

This student’s race project was lost when Scratch 2.0 offline editor crashed. He was mostly done and he lost all his code. Instead of recreating it, he made this cool project. (It is a bit glitchy, but neat.)

Spring Code Club Session Begins

Code Club session #8 met for the first time on Wednesday.  There are eighteen 4th graders and two high school volunteers.  This is the second time I’ve had a mixture of students from both elementary schools in my city in one club.  Another thing that is cool about the Spring session is that I have returning Code Club members, or, as we call them, “experts”.  Only 5 students are new to Code Club and there was only one student I didn’t know.

screen-shot-2017-03-02-at-6-56-38-am

A New Scratcher’s take on Maze game

After introductions, I asked the “experts” what favorite project they had from the last session of Code Club.  They remembered and liked the Maze game, Space Junk and Chatbot from CodeClubWorld. They also enjoyed the projects they had created themselves, not surprisingly.    I like starting with the Maze game and had already chosen that project for our first meeting.  It’s a simple game with many ways to make it more exciting and complex.

We started out by reviewing the maze design and refreshing our programming vocabulary.  What was the object of the game? How does the Sprite move (arrow keys or follow the mouse were options)?  What happens when you touch the edge of the maze?  How do you win?  Then we talked briefly about ways to make it more exciting – more levels, obstacles, villains, etc.

screen-shot-2017-03-02-at-7-08-28-am

Then they got to it. They were fairly independent coders, for the most part, and they helped each other a bit, too. My high school volunteers and I think we will be able to try some more complex coding  projects this round.  It was a really fun 75 minutes.

Thinking ahead, here are some goals for this session of Code Club:

  • Encourage more animation: We have some artists, so I’d like to share with them and encourage more creative uses of costumes for animation effects.

Screen Shot 2017-03-02 at 7.00.49 AM.png

  • Explore “more blocks”: someone is already exploring defining their own blocks.  I’d like to encourage more of this.  As well as random numbers.

Screen Shot 2017-03-02 at 7.02.18 AM.png

  • Clearing up misconceptions: We will have to revisit some concepts like the forever block and support better debugging habits
screen-shot-2017-03-02-at-7-03-35-am

Find the glitch in this code.

screen-shot-2017-03-02-at-9-58-30-pm

It seems this “expert” puts everything in forever blocks.

  • And finally – I want to use MakeyMakey‘s this time. I told them I want to use them with our projects – especially our final projects. Those couple of students who have played a bit with MakeyMakey’s were quite excited. I’m really excited (and a bit nervous). I don’t have much experience using MakeyMakey devices, with or without students.  Luckily that won’t stop me.

Coding Helpers

On Wednesday I decided to introduce Scratch to a class of second graders.  Wednesday’s schedule in the lab is such that there is an overlap of about 10 minutes with 4th grade alternative recess.  With the growing interest in coding among 4th graders, sometimes there are 4th graders waiting around for a free computer at the start of their recess.  I decided to put this fact to use rather than let it aggravate me. (They can be noisy while waiting).  I figured they could help me introduce Scratch to these 2nd graders.

screen-shot-2017-02-16-at-10-13-34-pm

My goal was for the 2nd graders to add a background and a Sprite and make the Sprite do something when clicked.  I sort of sprung the project on both groups but it worked out well.  The 4th graders, as a whole, were very helpful and the 2nd graders were pretty excited with all the choices. It amazed them that a couple blocks of code could make their Sprites interactive.  I was proud of my 4th graders for their enthusiasm and their ability to share their expertise in Scratch with the younger students.  More 2nd graders were able to get support while trying something new.  I’m pleased.

screen-shot-2017-02-16-at-10-07-11-pm

On other fronts, there are eighteen 4th graders signed up for Code Club.   Sadly, I’m competing with another after school program – Drama Club – so I have only 2 girls on my roster.

 

 

 

Code to Print

Code Club is on a break until the end of February. Meanwhile 4th grade students have been coding during alternative recess opportunities when the lab is available.

I have seen a growing interest in coding in BeetleBlocks now that we have a 3d printer available to print artifacts and I am quite thrilled.  Most 4th graders have had an introduction BeetleBlocks when we used it to print their names (I have one more 4th grade class to schedule), but printing names of their friends or teachers still interests them.

OLYMPUS DIGITAL CAMERA

Some 3d printed names

Some are just curious to print a single shape – cube, cuboid or sphere. Spheres are the hardest to print – even with a small cuboid base, they don’t print very well.  Students seem to love the prints that “blow up” as well as the successes.

I asked the snowman creator to add a cuboid below so the print would be successful, and it was.

screen-shot-2017-01-24-at-11-49-00-am

Snowman artifact

Recently I printed a cannon that a student had made in BeetleBlocks for a social studies report on the Middle Ages.  I asked him to break the code into 2 parts – the barrel and the base thinking that would help the print be successful.  It printed out well enough.  We glued it together with a 3d pen.

20170202_100616

Cannon printed in 2 parts, glued together with a 3D pen

What surprises the students the most is the size of the print compared to what they see on the screen.  Even though we went over the the numbers translate into millimeters.  I try not to scale anything but instead make them go back to the code and change it there.

Recently I printed a pair of rings.  There have been some other rings coded but this was the first project that reached the export to print stage. The 4th grader had started on Monday and measured her finger (with the mm calipers) to code a tube of that diameter.  Then we added a sphere on the top.  That was all we had time for on Monday.  On Wednesday she came in with a list of code she had written down.  She had worked on the project at home and didn’t know how to save it so she wrote down the code and brought it to school.  She also measured her friend’s finger to print one customized for her.

screen-shot-2017-02-04-at-6-39-03-pm

BeetleBlocks rings

OLYMPUS DIGITAL CAMERA

A pair of printed rings

It only took a few minutes to print.  The size will need some tweaking, but I suspect I will be printing more rings in the future.  We’ve shared the project for others to see or use.

In September I wasn’t sure what 4th graders could do with BeetleBlocks and every week they surprise me with their creativity.  I hope to report more on their explorations in the coming months.

 

Tales of Hour of Code 2016

Hour of Code or Computer Science Education Week was well received by the school this year. Every class from Kindergarten to 4th grade had the opportunity to work on one of Code.org’s Hour of Code tutorials during their computer lab time. This is Code.org’s third year of promoting a week of computer science education and I’ve supported them each year by introducing these tutorials to my students.

screen-shot-2016-12-12-at-7-27-21-amThis year Minecraft and Moana were the big hits, as well as Angry Birds and Star Wars.  The tutorial options are a great way to give students choice in the learning and they are so fun.  Students can’t believe they can play Minecraft at school.  I like the new Minecraft Designer tutorial.  I felt it gave the students a peek at the code behind the game and allowed them a lot of freedom of choice and freedom to be goofy.  What 8 year old wouldn’t want a chicken that lays diamonds!  Meanwhile they don’t even realize how much they are learning about how to program.

20161207_141456

1st grade Hour of Code activities

I do like to see who has that algorithmic thinking skill and is able to solve the tutorial puzzles independently.  For 2nd graders in general, Moana and Minecraft have pretty difficult concepts, like algorithmic planning, iteration and events (in Minecraft Designer).  Some of them look to each other for help, sometimes I have to read the directions to them, sometimes I have to be Steve or the boat so they can see how it turns in place and moves forward.  One 2nd grader surprised me at how easy the tutorial was for him.  I called him a Coding God (they are studying Ancient Greek Gods right now). He thought that was hilarious. I hope he signs up for Code Club when he is in 4th grade.

 

In addition to general class Hour of Code activities, my three math enrichment classes completed their Scratch math games.  That’s 27 new math games coded by 8-10 year olds. Here are the 4th graders, and 3rd graders studios. This week they played each other’s games and gave feedback in terms of Two Stars and a Wish, as I have done in the past.  I love this step in the game engineering process.  The students have to take the time to notice and test each game and learn to give good feedback.  I’m hoping we get time to improve the games based on the feedback they receive.

20161208_103326

I will leave the option of Hour of Code activities for the rest of December – making it Month of Coding at our school!

There are so many tutorials at Code.org/learn.  I may have to try a few myself. I’ve been meaning to learn Javascript.

Introducing Beetle Blocks to Students

I introduced Beetle Blocks to two math groups last week.  My first group was with six 3rd grade students.  They have done a minimal amount of Scratch coding and probably no 2-dimensional graphing (not to mention 3-D graphing).  I only have them for a short 20 minutes.  Still, they were very excited. The first day was just orientation to block-based coding and the categorizing of the blocks.  The second time we met, I asked them to draw a square.

The first time I started them with drawing lines but they were sometimes hard to see.  In the end extruding was easier to see what was going on and exciting to think about printing on our 3-D printer (if we get the grant).  They knew that a square was 4 sided and 4 cornered so we decided the pattern of the blocks would be ‘move some distance, rotate z by some number’ and repeat 4 times (although I didn’t introduce to repeat block yet)

beetleblocks-eb

Drawing a rectangle with different colored sides

It took some trial and error to figure out to turn 90 degrees each time to make a square.  After that success, I asked about making a triangle.  That was too much and they were having too much fun.

beetleblocks-aud

Without the reset button, clicking the green flag again adds to the triangle design

beetleblock-aug

90-something degrees

These students obviously just need more time to play with Beetle Blocks. It’s going to be a challenge to find the balance between introducing concepts and just letting them explore. They are all very excited and challenged by the program.

On Friday I introduced Beetle Blocks to eight 4th graders in another math group I just got. These students have more Scratch experience than the 3rd grade (more than half are in Code Club, too).  I didn’t make them draw a square, I just let them explore, after a quick demo of some of the key blocks (like reset).

beelte-play

I also made sure to introduce ‘extrude’ as a vocabulary word they will need to know when we start talking about 3-D printing things.

They were pretty keen on exploring and were able to code interesting things very quickly.

beelte-plays

4th grade explorer

beelte-playing

Super cool outcome by a first time Beetle Blocks coder

These students collaborated and shared some of their experiments.

beetle-playy

I did help with the coding of the variable here.

beetle-play

I did suggest the use of the nested repeat loop, and the random number.

At the end of the class a couple students indicated that they would be playing with this at home.  “Now I can either use Scratch or Beetle Blocks at home.” said an enthusiastic 4th grade coder.