Categories
education

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.

Help!  Save me!

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.

Dragon AI

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.