Categories

## Some Sums Sum, Sum Don’t

My eldest daughter has been getting maths homework for a year or two now. We try and do the homework together and I try and make it fun but it’s hard. It’s hard because if she doesn’t understand something by the second time I explain it, then to her I become like the teacher in Charlie Brown. Blah Blah Blah. This is especially true if when I’m explaining elementary mathematics, I make a mistake in my explanation. This happens often and only causes to confuse her royally.

And so it was with the topic of number bonds. My wife discovered, by attending a parent’s maths workshop at the school, that the children were learning that certain numbers in base 10 arithmetic are bonded. The bonds are simply as follows:

• 1->9
• 2->8
• 3->7
• 4->6
• 5->5

It’s fairly trivial but also fairly powerful in that once you know these bonds it’s a shortcut for mental arithmetic. We, as adults, know these ‘bonds’ so well that we probably don’t even recognise that we use them. The challenge then is to teach children this trick and thereby speed up their arithmetic ability.

One of the techniques that my daughter’s school uses is to send home ‘games’ that try and reinforce the learning they have done in the class. These games usually consist of a laminated sheet of instructions, a dice or two or other simple props. Usually these games are quite good and instructive. Some times they are totally confusing because they are meant to reinforce what was learnt in class and that doesn’t come across in the instructions. You’d think that I could ask my daughter to explain ‘how’ they should be doing it. It doesn’t work. Kids just aren’t that ‘meta’, that’s why they’re so much fun.

Now I have observed both my children playing on friv and Club Penguin. They are totally immersed in the most crappy Flash apps (although I have to say that most of them are actually quite fun!). So I thought I’d try and see if I could make a Flash game that would teach a little mathematics.

A while ago an ex-colleague posted about a super-cool Flash application he’d made. From that I figured out I could download the SDK and most of what I needed for free. However I thought I’d try the 60-day trial of Flex Builder. The added comfort of Flex builder is that it’s a pre-configured Eclipse for building Flash apps, so progress is pretty smooth-and-fast. Not sure I’d spend the \$299 for a personal license though. It’s not that good.

I had always thought that Flash development was complex but it turns out that it really isn’t. If you can program Javascript, then there really isn’t that much extra to learn to make it work because you can use ActionScript (which is a derivative of ECMAscript as Javascript is). The biggest difficulty I found was with laying out text. Something that HTML laps up, but turns out to be really cumbersome in Flex. I’m probably just doing it wrong.

And so the unimaginatively titled ‘Number Bonds’ was born. Enjoy.

If you’re interested in the code it’s here. It’s pretty messy though. I’ve also made a back-story-free page about ‘Number Bonds’ here.

Categories

## Why I Make A Better Software Developer Than Parent

A while back a friend and colleague revealed to me that he took an interest in programming from the very young age of six. Today he is all grown up and he’s just a little younger than me, and sadly (for me) a far better developer, in many respects, than I’ll probably ever be. If I’m being honest though, I don’t actually think that it would have helped me very much to have started at six years old, seven years earlier than I actually did. The truth is I think I’m doomed to a life of mediocrity (in this arena at least) simply because my head isn’t as well wired for the task as his. Still, though, I wonder about whether programmer parents exposing young children to programming at a young age is really a form of vanity-torture.

For me it’s the paradox of being a parent. I want to guide my kids into being socially acceptable people but I don’t want to tell them how to live their lives. My biggest hope is that they are happy people and I want to help them to achieve that. Nothing else really matters. It will matter, of course, if they wind up in jail because they stole my car whilst high on the latest techno-drug. Then I’ll be doing a lot of guiding, telling and most probably shouting. I am hoping though that it won’t come to that, but I’ll let you know how I get on. The heads on this tails-up coin is that I want to give my kids enough of everything so that they can make their own choices.

So, it was with some trepidation then that I wondered if I should teach my children a programming language as suggested last week by another esteemed ex-colleague. He offhanded-ly recommended (I haven’t asked him if he actually tried it) a programming language developed by Mitchel Resnick’s Media Lab team at MIT called “Scratch”. Now I don’t know if you know (I didn’t until 2 weeks ago) but Media Labs and Media Labs people seem to be doing good things everywhere. You know that “One Laptop Per Child” thingy everyone’s talking about? Well the founder of that association is a Nicholas Negroponte who is persuing the OLPC project whilst on leave from MIT Media Labs. Oh and did I mention that Nicholas co-founded and directed Media Labs too? Nice.

I was sold then. I thought I’d give Scratch a try myself and possibly expose my progeny to it. Now bearing in mind that my daughter is a few years below the target age of 8+, it was possible that this could very well not work out at all. But she is a fairly comptent mouse and keyboard user and is learning to read and write so I thought that there was a chance that she might like it if I did the driving.

The first thing I did was to tell her that Scrach was a game, and yes it seems I lie to my kids too. Next I told her that there was this little cat called Scratch and we could make him do what we wanted. She immediately, and with that childish-flair for the ridiculous ordered him to go and eat an apple. Dutifully, I hunted about in the clip art for an apple but could find only a banana so we settled on that. I showed her what I was doing, how when I took the building pieces from one side I could build up a list of things for him to do. She made a noise like she understood the concept at least so I was pleased.

After a while we got tired of watching the little cat eat the banana so I said there was a few ready made games to play. We tried them all out and the one she really liked was a game where a big fish chased little fish. Sometimes I’m really glad I’m not a psychologist. Anyway, when we were done I said if she would like me to I could make her a game of her own. Again, without even a pause for breath she told me she would like a game where a dragon chased a princess.

I like challenges so I spent 15 minutes after her bath time trying to figure out how to do that and built up this charming fantasy below using all stock clip-art and photos from the Scratch install.

I then built up a little “Scratch” program where the dragon would follow the princess about the screen if you moved her. Very pleased with myself (who’s the child now?) I declared to my daughter that I was done. I showed it to her and she liked it, but then something unexpected happened. She said, and I quote: “That’s nice daddy but it’s not really what I wanted. I want the princess to chase the dragon”. I explained that I’d made it behave like she asked me but I could change it if she wanted and so I did. So 5 more minutes passed and I wired up the two sprites the opposite way around and then, a little less pleased with myself announced that I had finished. We had fun letting the princess chase the dragon and then she said: “I want to be the dragon”.

I wasn’t as much exasperated by this as surprised. I scratched my head, pointed silently at the screen, wagged my finger at it, made a shape with my mouth like I was going to say something and then didn’t. I then turned to her and said: “But if you control the dragon where will the princess go?”. She shrugged and then said “You can use the keyboard to move her”. Now then. Let’s stop and review. The important point here is that my rudimentary “follow” AI of the dragon sort of just happened. I just created it because that’s what I thought she wanted. However, the more I think about it the more I know that I did it wrong. What she wanted was obvious all along. She wanted a version of the big-fish chases little fish game where the chasing character was a dragon (not a big-fish) and the chased character was a princess (not a little fish).

In about 15 minutes my daughter had shown me exactly why requirements gathering is crucial. I’d let my guard down and taken one on the chin from a 5 year old. Now this was play-time so there weren’t any penalty clauses in our contract but if this hadn’t been play-time she would have sued my sorry white ass. I joke of course. Her lawyer won’t touch software contracts, not after the last time. But you get the picture.

Overall though I really enjoyed using “Scratch” and I enjoyed showing Scratch to my daughter. I especially liked the way that the code ‘blocks’ are shaped in such a way that each building-piece has a limited number of places where it looks like it will fit. I also like the way that the whole think feels ‘chunky’, like big fat duplo bricks.

Finally I also like the way everything is colour coded. All these things are real genius since it’s a visual reinforcement that teaches the difference between the different elements of the program. More importantly though there are plenty of visual cues about what you could do next if you weren’t really sure. The only thing I didn’t like was that I had to drop a screen resolution so that all the fonts were nice and big. It would have been nice to be able to adjust them to suit my needs. But hey, it’s not a big deal.

So, there you have it. I tried and nothing bad happened. I might have created a revenue stream for tomorrow’s psycho-analyst or I might have created tomorrow’s psycho-analyst or maybe even programmer. Who knows or cares. It was just fun to do, that’s all.