## Monday, 23 December 2013

### Real Maths Game: The Confused Shopkeeper

Here's a game we made up to explore number bonds: ways of combining numbers to make 10 (or 20, 50 or 100). It's a pretty simple game and your children will probably not think of it as maths.

How to play the game...
1. Collect items from around the house, anything small will do.
2. Roll a dice for the price for each item
3. A player shouts out if they want to buy it
4. The player gives the shopkeeper 10p
5. The shopkeeper can either cheat them or play fair with the change
6. If the player spots that they've been cheated, they say "Cheat!" and keep the item and get their money back.
7. And the winner is... not sure yet, we'll figure this out!
For example:
1. Roll dice = 3
2. Who wants this apple for 3p?
3. I do
4. Give 10p to shop keeper
5. Shopkeeper gives 6p change
6. Player shouts "Cheat! I should get 7p!"
7. Player keeps apple and gets money back.
Variations:
• Once the kids figure out how the game works let them swap roles so that each has a turn as the shopkeeper
• To start with keep prices under 10p, but as everyone gets better, use more dice and have higher prices
• See what other rules the kids suggest, and try them out.

## Thursday, 7 November 2013

### Real Maths?

We've been home educating our children for the past few months and experimenting with an autonomous, child-led, approach. So we're wondering quite a bit about how maths fits into autonomous learning...

What's maths really about? What's maths for? What maths do we need in real life?
Does maths have inherent interest or beauty? Some maths doesn't, e.g. solving quadratic equations or multiplying fractions. And why do we need this stuff anyway?

Can we learn maths by considering interesting problems, big ideas, real world things, rather than working in the traditional school approach with foundations and bite sized steps?

I think so. Here's what I'm trying...

Pose a Big Maths Question (see below), perhaps with an initial example, and leave the kids to investigate. Consider giving some hints, but basically let them explore, make mistakes, go down blind alleys and so on.

The theory is: the exploratory journey is at least as valuable as getting the 'right' answer. And there may be more than one right answer.

And maths games?

I'm also experimenting with some maths games, the first of which is The Confused Shopkeeper.

## Big Maths Questions

### What makes things float?

Examples:
• Drop some modelling clay in water and watch it sink. Now shape it into a boat and see it float. Why does it do this?
• Compare an apple with an egg -- why does one float and one sink?
• What about other things around the house?

A boat made from Polydron, wrapped in cling film. Surprisingly stable

A coracle frame made from cardboard, and then wrapped in cling film and floating, fully loaded!

Hints:
• Is it something about the weight of the object? But why did the clay sink AND float?
• What about the displaced volume of water? How would you measure this?
• If you note the weight in grammes and displaced volume in mililitres what do you notice about the things that sink, and those that float?

### What makes things stable in water?

Examples:
• Take the clay boat from above and add some weight to one side, what happens?
• Take a floating dish with a flat base, add some marbles, what happens?
• How might you make things more stable in water?
----

## Tuesday, 5 November 2013

### Scratch Club Review

What went well in Scratch Club at my local primary school?

Reading back to my first post on Scratch Club Plans, I had in mind myself as a teacher, someone who would deliver lessons and impart knowledge to the students. I spend a fair bit of time looking at what to teach the kids next, and working out ways to present this info in bite sized chunks.

But later I recognised that the students had their own interests and agendas, and that these provided their motivation to learn, with each student preferring their own path.

Recognising this, I created the Scratch Club Badges as a way to explain the many aspects to Scratch programming and provide a way for each student to pick their own way through the subject. This worked as a way of giving each individual something to aim for that interested them, but it had a side effect of producing some competition/arguments amongst the students with them spending a bit too much time comparing themselves to each other.

## Things that worked well

• Students can work on anything that interests them, and spend as long as they like on any area of Scratch
• Students can talk to each other, walk around to see what others are doing, copy ideas as they wish
• Students are encouraged to help each other
• Final demos, at the author's request, of their work
• Initial demos of ideas from me at the start of sessions, e.g. to show something new and inspire them to try

## What I'd do differently next time

• Kick off with the rules, or rather lack of the usual school rules … e.g. OK to explore your own interests, walk around, talk to each other, copy ideas
• Try to get at least an hour, or preferable hour and a half for each session
• There's no need to prepare so many lesson plans, but get some feature demos ready for each lesson

## Friday, 24 May 2013

### Scratch Club 22May13

My notes from the Scratch Club this week...

We covered variables today, using them to try and track the game score and lives left.

### What went well:

• Everyone was interested in variables and most got this idea
• Behaviour was much improved today, the kids really got down to the task quickly
• One of the students discovered the music blocks and created some pretty cool rhythms.

### What could be improved?

• We had a two week gap, and a few of the kids have forgotten most of what we learnt before!
• Not all kids have Scratch at home, so I've written a letter to go out to the parents: Get the kids using Scratch at home
• I'm still teaching only 8 kids, but there are many more in the school that want to take part.

### Ideas

• Some kids clearly know what they are doing now, so could help run the club?
• If we can have good behaviour and a recognition program so that we know when we have new trainers ready then I think this could work.

### Scratch Programming at Home

Dear Parent / Guardian,

Your child has been learning to program a computer at school using an easy to learn and free application called Scratch.

Many children have asked if they can use Scratch at home, so below we explain what it is, and how to download it.

What is Scratch?
Scratch is a downloadable application for your PC or Mac, that makes it easy for you to program your own interactive stories, games and animations, through colourful drag-and-drop blocks. It comes with some background images, characters and sounds ready to use, but you can also add your own images and sounds, making it even more fun.

Is it safe?
The software comes from trusted and respected education institute, MIT, and is safe to download.

Your child doesn't need to sign up for anything, but there is a free online moderated community that your child can join where they can share their projects with others. There is a huge benefit in sharing projects and receiving and giving constructive comments. For further information see http://scratch.mit.edu

Yes, completely free.
There are two versions of Scratch, version 1.4 which is the one we are using in school: http://scratch.mit.edu/scratch_1.4/

Scratch has a good help system built in, just go to the Help menu and explore from there.

This book is well suited to children learning Scratch: Super Scratch Programming Adventure!

---------------------

Thanks to Andrew Johns for most of the content of this letter: http://andrewjohns.net/blog/2012/12/a-letter-to-parents-regarding-scratch/

Continuing on from my interest in how the Scouts maintain good behaviour and reward progress I'm going to introduce some badges to recognise students as they master the different aspects of programming.

So here's an initial list of badges (I need to make these sound more fun)...
• Move a sprite around
• Make infinite loops
• Use the pen, both to make trails and draw shapes
• Control a sprite with keyboard and mouse
• Make aliens
• Artist: make backgrounds and new sprites
• Conditional logic (if statements)
• Sensing events (touching sprites or colors)
• Sequencing and nesting commands (understanding the difference between putting things in a loop, or before a loop)
• Variables to track scores and lives
• Random walks and events
• Animator: make sprites more realistic with moving legs etc
• Drum rhythms
• Broadcasting events (such as end-of-game)
• Music
• Intelligent aliens, e.g. that hunt down your character in interesting ways
• Gameplay: challenging games that are not too hard or two easy
And:
• Problem solver (debugging scripts)
• Trainer (helping others learn)
• Idea generator (lots of ideas for scratch projects)
Doubtless I'll add more as the club progresses.

So now I just need to make these into some sort of badges, or stickers!

## Wednesday, 1 May 2013

### Scratch Club 1 May 13

As I said in last week's post, I wanted to use this week's session to improve the learning process, rather than simply learning more about Scratch.

So we kicked off this session with a retrospective, I asked each student in turn what they liked and what they wanted to change, here are some of their responses:

Likes:
• How to use 'if touching colour' to create interesting games
• Programming is fun
• 'Everything'
• Scratch is fun
Things to improve:
• Often very noisy, and quite a bit of messing around (lots of kids said this, with no prompting from me)
• Not enough time, want to start earlier
I added a few more things I wanted to improve:
• There's lots to learn, and it's easy to forget what we've covered already
• Lots of kids get stuck and wait for me to help them
We then discussed ideas for improvement:
• For behaviour—the kids suggested writing names under happy + sad faces on the board, or giving out house points for good work. Everyone agreed that this was important to sort out.
• For more independent learning—the kids suggested they try the Help feature in Scratch. I also suggested that they could ask each other.
• And I also said I was going to try visiting each student in turn rather than going to whoever was shouting out.

## So on to the lesson:

We began by recapping some stuff we learned last time, I put together a simple script on the big screen: bouncing the cat around the screen, using the pen to draw trails, using stamp to fill the screen with cats and changing the colours to make it look more interesting (see right).

I added each element in turn and asked the kids to shout out what they thought would happen for each element.

See below for the results.

I then set the kids lose trying to produce something similar. Many produced pretty psychedelic creations with multiple sprites bouncing, lots of colours and movement.

## What went well?

• Most of the kids have got the basics of programming sorted: loops, sprites, movement, etc
• Everyone was much more self sufficient this time, walking around to each in turn worked really well, there was a lot less shouting out.
• There was a bit of collaboration between kids, helping each other out and admiring each others' work.

## What could be improved?

• More tricks and tools to get the kids focussed more quickly, so we waste less time dealing with disruption.
• It would be nice if the kids could start working towards a bigger project, rather than working on short, simple scripts each week.

## Saturday, 27 April 2013

### Getting Things Done with Smalltalk + Seaside

I've been learning Smalltalk + Seaside over the past few months, mostly because I like learning new programming languages and Smalltalk + Seaside seemed pretty different to my usual Python + Django. So I've created a simple Getting Things Done app to give me something real to play with.
It's pretty basic, but big enough (for me at least) to get a real feel for the tools. Feel free to download and play with it here: http://smalltalkhub.com/#!/~ericclack/GettingThingsDone
I've tried to test that I have included all required dependencies, and downloading to a fresh Seaside image seems to work, but I'm new to Smalltalk so may have missed a few things.
Have fun and let me know if you have any comments...
-Eric.

## Wednesday, 24 April 2013

### Scratch Club 24 Apr 2013

Notes from second Scratch club...

## What went well?

• Still lots of enthusiasm and excitement about the club
• Demos still a real motivation

## What could be improved?

• What we learnt last time hasn't stuck for many kids
• Still lots of dependence on me, frequently kids stuck waiting for me to answer a question
• Sometimes excitement spills over and kids find it hard to settle back to the task
• A few kids find it challenging to concentrate for more than a few minutes.

## Ideas for improvements

1. Plan each lesson with some overlap on the last lesson: build on things already covered to reinforce learning.
2. Visit every kid in rotation for Q&A, stop kids shouting out for answers and encourage them to try to find solutions first while they wait for me to come round.
3. Some cheat sheets or tips for common tasks and reinforce things we've covered, such as: getting a sprite to follow the mouse, getting a sprite to bounce around the screen, using the cursor keys to move a sprite.
4. Try answering individual's questions to the whole group, e.g. on the white board so that everyone can see the answer.
5. Nominate a random helper each week to help the group?
6. Send some resources to parents to help kids be practice at home, e.g. starting out with Scratch.
7. Create some tasks to practice at home.

## Programming concepts discovered:

Bear in mind that many things covered last week had been forgotten!
• If-statements and events such as speech bubbles and sounds
• Some of the sensing instructions, such as touching another sprite
• Broadcasting messages to change the background, e.g. to "You've won!"
As before, not all children got all of these.

### What next?

I think next week it should be less about learning new things, and more about creating a better learning experience (see above).

### Later:

• If-statements to make things happen (e.g. killed by a monster)
• Sequencing and nesting commands, what difference does it make?
• Logic: one thing and another happening, 'or', 'not', etc.
• Moving along more interesting paths, e.g. spirals, random paths
• Variables to control aspects of the game

## Wednesday, 17 April 2013

### Scratch Club 17 Apr 2013

I've just completed my first Scratch Programming Club and here's a quick retrospective...

## What went well?

• Kids' enthusiasm for learning
• Scratch is a great environment, it's easy, safe and encourages exploration
• Kids are fast learners and have great imagination
• Games are great inspiration for the kids to try out programming
• Then end of lesson demo was fun.

## Programming concepts discovered:

• Sprites, Script and other Scratch things
• Movement controlled by some input, e.g. pressing a letter
• Loops to repeat movement, and infinite loops
• Turning and bouncing off the edges
• Chasing: one sprite chasing another
• Using the pen to leave trails
Not all children got all of these, but most got most of them.

### What next?

• If-statements to make things happen (e.g. killed by a monster)
• Logic: one thing and another happening, 'or', 'not', etc.
• Moving along more interesting paths, e.g. spirals, random paths
• Variables to control aspects of the game

## What could be improved?

• I tried to give the kids the option of a Game project vs an Art project—they all showed interest in both, but we all ended up doing just the Game project as it was hard enough giving guidance on one thing.
• Most of the children learnt alone (no one shared a computer) and they saw me as the goto person for problems. It would be good to get them working together more.
• I had from 12:20 to 13:00, and 40 mins is not much time, but that's all we have as this is a lunch club. Is there some way to join up sessions so that kids can make progress one week to the next?

## Thursday, 4 April 2013

### Teaching programming using SOLE (Self Organised Learning Environment)

Further to my previous post on teaching Scratch in schools I'm wondering whether I can use a different approach, called SOLE, to encourage more independent learning and creativity.

SOLE stands for Self Organised Learning Environment, where self = the student. So the children drive the learning, with the 'teacher' asking an interesting question to get things started, setting out the process and basically staying out of the way as much as possible.

Sugata Mitra has popularised this approach (through research and TED talks), here's a great introduction: http://www.ted.com/talks/sugata_mitra_the_child_driven_education.html

## How it works

The room is set up with a computer with internet access for each group of students.

First the teacher asks an interesting question to direct the learning (see below)

There are some simple rules:
• Students need to form small groups (of about 4) — they can choose their own groups and change groups at any time.
• Children can look to see what other groups are doing and take that information back to their own group
• They should be ready to present their answers back to the class at the end of the session

To kick off each SOLE session I need to set a question that the students will research. These should be open ended, difficult questions (so no 'yes/no' questions). For example:
• Is a computer intelligent? Can it trick you into thinking it's a human?
• How fast are your visual reactions?
• How fast are your listening reactions?
• How long do you need to see something to recognise it?
• What makes a computer game addictive?

## And...

It seems that the collaborative nature of the SOLE approach is key, and this is much more effective than each student working alone with their own computer. We'll see how this works out in the classroom, I'll report back once I've given it a try.

## Resources:

http://www.ted.com/talks/sugata_mitra_the_child_driven_education.html
http://www.ted.com/pages/sole_challenge
http://repository.alt.ac.uk/2208/

## Wednesday, 27 March 2013

This recipe began life in the book Practical Paleo. I've added more cocoa and butter to boost the flavour.

As with all my paleo recipes you'll probably be surprised that these are not very sweet, but give your taste buds a few seconds to adjust and you find them very satisfying (I hope!)

## Ingredients

• 2 eggs
• 50g melted butter
• 20g honey
• 1/2 teaspoon vanilla extract
• 1 cup or 250ml shredded coconut (I used desiccated as I don't have shredded)
• 3 tablespoons unsweetened cocoa powder
• pinch of bicarb of soda
• pinch of salt
• 1/2 cup sliced almonds

## How to make

1. Set oven to 170ºC
2. Whisk the eggs, melted butter, honey and vanilla until well combined and a little frothy
3. Mix in the cocoa, bicarb of soda and coconut
4. Add the almonds and fold in
5. Divide into small mounds on a baking parchment lined tray
6. Bake for 15 mins, check if done -- they should feel a little springy to the touch, add a few more mins if required.

## What next?

Be interesting to experiment with other flavours to go alongside the cocoa, perhaps reduce the cocoa and add peanut butter, or raspberries, or orange oil?

### Paleo Coconut Macaroons

This recipe started out as Nigella Lawson's Coconut Macaroons recipe but I've tweaked it to add more egg white and remove the sugar (replaced with honey).

## Ingredients

• 4 large egg whites
• 1/2 teaspoon cream of tartar (this makes it easier to whisk the whites)
• 100g honey (or caster sugar)
• 30g ground almonds
• pinch of salt
• 1 teaspoon vanilla extract
• 250g shredded or desiccated coconut

## How to make

1. Set oven to 160ºC
2. Beat the egg whites until frothy, then add the cream of tartar and beat until soft peaks are formed
3. Add the honey and continue wisking until the peaks hold their shape
4. Fold in the almonds, salt, extract and coconut - you should end up with a slightly wet mix, but stiff enough to hold its shape when you do the next step
5. Form into little mounds about 5cm across on some baking parchment, you should get about 10 or so
6. Cook for 15 mins initially and check, they should be nicely golden in parts, add another few minutes if not done.

## More things to try

• Drizzle with some melted dark chocolate - something like Lindt 70%.

## Wednesday, 27 February 2013

### Teaching Scratch in Schools

In a couple of weeks I'm going to start teaching computer programming to some 7 and 8 year olds in my local school.

I've seen my two children (6 and 8 years) really take to programming in the past few years (using Scratch) and because programming is my day job I've been able to support them and help them learn. Quite a few friends have asked if I can teach their kids, so I thought "why not do this at school?"

Programming is great for developing many of the traditional skills such as maths and logical thinking... it's also great fun and keeps them away from all the games!

I've found the best tool for teaching children programming is Scratch because it's very visual (so no need to remember commands), it's quick to get results, it's easy to install and is free. It's also has an active online community, see http://scratch.mit.edu/

## Preparation

Talking to teacher friends of mine one thing is clear: I need to be prepared! Specifically, I need to get some lesson plans together and aim for some specific learning outcomes, these can then be broken down into bite sized pieces that can be tackled and completed in each lesson.

So this blog post is an initial brain dump of ideas... hopefully this will come together into something more coherent soon, and I'll come back and update this as the lessons progress.

To get the children's interest I'm going to set out two projects that they can work on: an art project or a game project. The children can choose whichever interests them most, or switch if they want to try something different.

## Introducing scratch

For those children that have never used Scratch before I need to show them how it works, but I'm keen not to spend too long at the front of the class, preferring instead to get them going so that they can learn 'on the job'.

This is a great book that walks you through the basics (as well as more advanced stuff):

The basics:
• The Stage—where the sprites perform
• The Palette—where you find all the commands (e.g. to move a sprite)
• The Scripts Area—where you arrange commands into programs
• The Sprite List—when you start using multiple sprites this is where you manage them (e.g. to create new ones, or switch between each sprite's scripts).

### Art project

Aim: Program the computer to produce pictures using shapes, colours and randomness.

Here's some inspiration:
Challenges:
1. Draw on the screen with the pen
2. Draw shapes, starting with a square
3. Explore other shapes like triangles, pentagons etc
4. How would you draw a circle with the pen?
5. Repetition
6. Randomness
7. Using keyboard input to change things (such as shape or colour)

### Games project

Aim: Create a computer game that is fun and challenging. E.g. a chase game where you have to avoid the aliens for as long as possible.

Plenty of inspiration here, especially for those with memories of early home computers like the ZX spectrum and BBC micro:

Challenges:
• Create an alien sprite, and make the game end if you touch it
• Add in lives so that your sprite can survive a few alien impacts before the end of the game
• and so on...

## Friday, 8 February 2013

### Some example Smalltalk code for a simple quiz

I've been playing with Pharo Smalltalk over the past few weeks and have been impressed with its elegance and feature set, literally everything is right there in the environment, from UI dialog boxes, to sound effects.

One of the things that surprised me though was the lack of example code on the internet. This is a real contrast to something like Python/Django, which has example code for everything easily available.

So I'm going to try posting a bit of code now and again to see if this of use to others.

In this example:
• Some simple classes for a quiz, you can easily extend this to ask any sorts of text questions
• Basic use of OrderedCollection
• Popup dialog boxes for the questions and answers
First add a new category for your quiz classes, I called mine EricQuiz:

Now add a new class Question and its methods:

Object subclass: #Question
classVariableNames: ''

poolDictionaries: ''
category: 'EricQuiz'
"Ask the question and return 1 if answered correctly, 0 otherwise. If the user gets the answer wrong, they can try again."
| choice |
choice := UIManager default chooseFrom: answers
message: question.
self inform: 'Correct!!'.
^ 1
ifFalse: [
(self confirm: 'Sorry wrong answer. Try again?')
ifTrue: [ ^ self askQuestion ]
ifFalse: [ ^ 0 ]

list

index

setQuestion:
text
question := text

Now add the Quiz class, which is a collection of questions and a score.

Object subclass: #Quiz
instanceVariableNames: 'questions score'
classVariableNames: ''
poolDictionaries: ''
category: 'EricQuiz'

Add these methods as class methods:

capitalCitiesQuiz
| quiz |
quiz := Quiz new.
quiz questions add: (Question new setQuestion: 'What''s the capital of England'; setAnswers: #('Paris' 'London' 'Amsterdam'); setCorrectAnswer: 2).
quiz questions add: (Question new setQuestion: 'What''s the capital of the Netherlands'; setAnswers: #('Brussles' 'Schipol' 'Amsterdam'); setCorrectAnswer: 3).
^ quiz

spellingQuiz
| quiz |
quiz := Quiz new.
setQuestion: 'Which is the correct spelling?';
setQuestion: 'Which is the correct spelling?';
setQuestion: 'Which is the correct spelling?';
^ quiz

And these as instance methods:

score := 0.
questions do: [ :question |
score := score + question askQuestion ].
self inform: 'You scored ', score asString, ' out of ', (questions size) asString

questions
questions ifNil: [ questions := OrderedCollection new ].
^ questions

questions: anObject
questions := anObject

Finally, you can run the quiz by running:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Update:

For basic language examples, like Strings and Streams, there's a great free book called "Smalltalk by Example: the Developer's Guide" by Alex Sharp:
http://stephane.ducasse.free.fr/FreeBooks/ByExample/

Thanks to Stéphane Ducasse for the links: http://stephane.ducasse.free.fr/FreeBooks.html

### Seaside: an elegant web framework in Smalltalk

I've been playing with a web framework called Seaside and I think it's very interesting. Coming from a background in Perl, mod_python, and Django it really makes you think again about the best way to design and build web applications.

Seaside provides inspiration for where web frameworks are heading, away from the technicalities of HTTP requests and back towards something more direct like desktop UI programming.

Here's the best bit I've seen...

Imagine you have a delete method on a record that the user can call by clicking on a Delete button on a web page, but you want them to confirm the delete first, here's how you do it in Seaside:

Here's the bit that renders the button -- this is in the app code, not in a template (there are no templates) -- notice the callback:

html anchor
callback: [ self removeContact: aContact ];
with: 'remove'.

And here's the removeContact code, actioned by the that callback above:

removeContact: aContact
(self confirm: 'Are you sure you want to remove', (aContact asString))
ifTrue: [ Contact removeContact: aContact ]

That 'confirm' bit actually interrupts the method, renders a web page with the confirmation form, then restarts the method passing back in true/false. There is no URLs, no templates, no fiddling about with param decoding, just concise code. I think that's amazing!

From Wikipedia:
Over the last few years, some best practices have come to be widely accepted in the web development field:
• Share as little state as possible.
• Use clean, carefully chosen, and meaningful URLs.
• Use templates to separate the model from the presentation.
Seaside deliberately breaks all of these rules; Avi Bryant describes it as a 'heretical' framework. He argues that this careful and reasoned rejection of the conventional wisdoms of web development has led to a very effective model for the development of web applications.