Sunday 28 June 2015

Week 5 (23rd June)

Scratchers 

Scratcher this week worked on the "when sprint clicked" EVENT, shown in Figure 1.
Figure 1:  When this sprite clicked block from the EVENTS block.
The idea was to combine some random action based on last weeks activity with some action such as a "hide" (from the LOOKS block) which should occur when a mouse button is pressed while over the sprite.  Scratchers should watch out for funny effects such as the action not working sometimes.  This can happen if the sprite is busy doing some other complex activity, such as gliding over a time T-seconds.  In such a case, you need to wait for T-seconds before you can click on the sprite.

Gurus  


Gurus continue to work on their primary games.  Many students are close to finishing PONG, but as a Guru, you need to make sure it is really working perfectly.  If there are any weird effects you can't understand talk to me, or another Guru or Apper.  This week we started the mentor program, where 3-Guru's are assigned to work with the Scratchers.  We will select 3 different Guru's each week to work with the Scratchers, as this helps the Guru's refine their skills and helps the Scratchers overcome some stumbling blocks.

Appers

Appers had a different activity this week as described below.  They needed to create an animated GIF by following these steps.
1)      Create some slides in power point of an image.  In each slide, make the picture only slightly different from the previous so that when you flick through the slides, it looks like a  simple animation.
2)      Save the document as a power point file (myfile.pptx).  Then use the “Save As” button and select the “Save as type” as a GIF file (or JPG or PNG)- see Figure 2.

Figure 2: Select the "Save as Type" in powerpoint to a GIF (or PNG)


3)      It will then ask the question shown in Figure 3:
Figure 3:Which slides to export Dialog box











4)
      Select “All slides”  This will save every slide in the document to a folder with each slide given a different name.
5) Now go to : http://gifmaker.me/  which will bring you to the screen shown in Figure 4.
Figure 4:  The GIFMAKER main screen
6) Upload you images (all the slides created)
7) Then select the Animation speed to the right
8) Then click “Create GIF animation”
9) Download the resultant GIF.


When you click on this gif it should now run in a browser and be animated.
Activity: 
Check the file size of GIFMAKER.  It’s good to make the GIF files very small to reduce the time it takes to load.

Adjust the “Image size” number of pixels on the right and repeat the above, checking out the effect on the file size when you download it again.
You can now use this GIF as an icon or avatar. 
Here's an example of my snowflake animation that I use for my Scratch ICON.  This file is only 15kbytes in size.

Saturday 20 June 2015

Week 4(16th June)

Scratchers:  

This week the Scratchers experimented with random numbers.  In Scratch we can create random numbers using the [pick random {lower num} to {upper num}] block - see figure 1.  This block can be found under the OPERATORS tab
Figure 1:  Random block in scratch found under the OPERATORS tab

Scratcher are excouraged to experiment with using random numbers to add some unpredictability to their programs, as they would find in real games.  For instance, you could move around the screen to random locations as part of a "find and click" game.  Try the block shown in Figure 2 for example.  Note the range I have used for the random numbers.  Refer to week 2 where we discussed how to move around the screen.  In that week we used an x-direction number line (left-right) and a y-direction number line (up-down).  Check to see you understand how large positive and how large negative the x and y number line values can be 
Figure 2: Using random to move around the entire screen
Or maybe you just want your sprite to randomly do one thing or another...like changing costume.  You can use the [if then else]  block we learnt about in week 3.  Try out the code block below (use the cat sprite to ensure you have at least 2 costumes).  The result of this code block is shown in figure 4.
Figure 3:  Random selection of 1 or 2 options (changing costume)
Figure 4:  Result of the random costume changing cat

Gurus:

Figure 5:  Block that results in reflection
of the sprite from each of the 4 walls. 
This week the Gurus helped to take apart an old tower desktop computer.  The students had to identify the hard drive, the memory and the central processing unit (CPU).  Many students made a simple sketch of the motherboard.  If anyone has a sketch they can scan and post from the session, it would be great to see.
Many of the Guru's are having an issue with the return bounce of the ball off the bat or walls in the game of PONG.  This is a reflection-off-a-surface problem.  The ball should come off the wall at the same angle the ball struck the wall.  There is a  detailed block-segment and explanation from the Scratch Wiki, however the math is difficult to appreciate for primary students.  Still the block works fine to use.  Another method uses broadcasts which will not be covered for a few weeks for the Scratchers.  A simpler (maybe) method is shown in the block I created in Figure 5, with the resulting output from this block shown in Figure 6.
Figure 6: Animated sprite reflecting off each
of the 4 walls
From next week 2-3 of the Guru's will be selected each week to help out the Scratchers.  This peer learning is a really effective way for the Scratchers to learn and for the Guru's to improve their own understanding and get recognized for the skills they have already developed. 

Appers:

Network issues are still delaying the Appers from being more productive, but they're in there each week programming away and helping the Guru's develop their skills.  Many thanks to the Appers for their patience and the tech-savvy parents helping to solve the issues.

Old Laptops for Kids

Some parents are interested in using older laptops for their children to experiment with programming and Scratch.  I highly suggest using Puppy (follow the link).  It has a very small installation size so can fit on older laptops/desktops with lower capacity hard drives.  If you're just running a browser and scratch with no intensive video or graphics, this is a simple option for you.

Wednesday 10 June 2015

Week 3(June 9th) Activities

Week 3


Figure 1: <if> -<then>-<else> block in Scratch
This week we looked at the <if> -<then>-<else> block in Scratch.  This block is shown in Figure 1.
 The <if> portion requires a question to be asked with a yes or no answer.  Based on the answer, the block would do one function or <else> it would do another. We ran a simple activity to show this to the students.  I tapped each student on the head and asked "Do you have brown hair ?".  If the answer was "yes" the student went to the left and waved their arms, if the answer was "no" the student would go the the right and jump up and down.  At the end we had sorted all the students with brown hair into a hand waving frenzy, with non-browns jumping.

The activity for the "SCRATCHERs" this week was to use the <if> -<then>-<else> block in Scratch to perform some simple function.  As well, the students need to continue with the next tutorial in Scratch and save each tutorial when completed.
The "GURUs" need to continue with their game, being careful to obey the rules of pong as closely as possible (scoring, realistic ball motion and bounce from bats, ball reset to the center when the point is lost).
The "APPERs" are still having connection issues between the school computers and the tablets using the MIT App inventor, so until resolved we have started them looking at Arduino in Scratch, by controlling an LED, speaker and servo connected to a simple robot.  Details of the activity and installation required can be found here (setup by some vacation students I had in 2014).

Keep programming and save your results



Week 2 (2nd June) Activities

Week 2 (2nd June)

Figure 1: Simple number line starting from 0
This week we reviewed the basics of the number line.  Most students at year 3 level are used to the number line starting at zero and going to infinity, as shown in Figure 1.

Figure 2: number line going from minus infinity to positive infinity
However in practice the number line can extend just as far to the left, and to show this we use negative numbers, as shown in Figure 2.  
Figure 3: x-axis numberline in Scratch going from -240 to +240, with 0 in the middle
We can use this number line concept to move objects around the screen in Scratch.  but infinity is a pretty big number and our screen has only 240 spots (or pixels) to the right of zero and 240 pixels to the left of zero.  We call this the x-axis and this is shown in Figure 3.

Figure 4: x and y axis combined 
Now if we turn this number line so that it points up and down, with positive numbers going up we still have a number line.  We call this the y-axis and these numbers in Scratch have 180 pixels above zero and 180 pixels below zero.  We can combine both x-axis and y-axis as shown in Figure 4.  In mathematics, this is called the xy-Cartesian axis.  To put an object at the top right location, you would set the x=240 and y=180, and we right this as (240,180) or (x,y) where x comes first, then y.
To help move objects around the screen in Scratch, you can use the xy-grid backdrop in Sratch, which is shown in Figure 6.  This really helps to figure out the (x,y) location on the screen where you want your sprite to go.
Figure 5: xy grid backdrop available in Scrtach
In Week 2, students should practice using the "GLIDE" command in scratch to move a Sprite around the screen, going from each corner to each other corner by specifying the (x,y) locations to glide to.