Saturday, January 27, 2007

Humble Beginnings

Here is the first screenshot on SplotchiTown. Just for reference. It is completely non-functional, with no dynamic behaviour.

Monday, January 22, 2007

Start at the Beginning - Understanding the Problem Domain

To kick off the project, I called the kids together. We did it yesterday (Sunday) after morning tea, which I figured would be their peak time in the day for learning. I told them we were starting a new project together.

I gave them a brief overview of what we were doing: building our own creature on the computer, like their Tamagotchi. We can't make the plastic bit with buttons and screen, but we can make the creature on the computer, and we've got a bigger screen so maybe we can do some better things.

I laid out some ground rules for when we work on the project:
  1. No being silly or distracting others when we're working together, so we can all focus.
  2. If any of the children don't want to be involved at any particular point, that is OK, but I will still show them the outcomes of each step. This provides a minimum level of involvement, while it allows those who are most interested to have most involvement.
Emily, the youngest, commented that she didn't want to build it, but she wanted to play with it. We'll see!

Moving right on, I got a few big pieces of paper. On the first piece of paper, we worked out some things about the creature. I wrote two headings on the paper, "Properties" and "Actions". Under the first, we listed properties a creature may have (name, age, gender [maybe], level of hungriness, level of sickness. This required a little prompting, but they got the hang of it quickly. (Emily and Benj sat with their Tamagotchis trying to find the answers to the questions - maybe their first attempts at reverse-engineering!) [I had spoken to Olivia, the older child, before we sat down, to ask her to let the others try to answer questions first, so all the children would get a chance to be involved. She went a step further, helping to elicit answers from them.] Each of them was involved, each thinking about their experiences with their Tamagotchi, and relating that to what we were talking about. It was cool.

Then we wrote down some of the things that we do to the creature: feed it, play with it, take it to the toilet, give it medicine, etc. I wrote these under the "Actions" heading.

On another piece of paper I drew a big rectangle, and told them this was the screen. I drew a box down the left with rectangles in it, captioned with the actions. On the right, another box, showing the properties. In the middle, a big white area where I drew a stick figure. I said we were going to build this.

As we were working through this, it occurred to me that the cognitive complexity is high, but as long as the time between introducing a concept and seeing the realisation of the concept is kept short, they will generally understand what's going on. This means introducing as few concepts as possible, as late as necessary. It also means leaving out detail.

Explaining this to children was much the same as explaining technical things to adults in a business environment - business people usually want as simple an answer as possible, but sufficient to deliver what they want. All the years that I have been trying to perfect the art of making the complicated sound simple is paying off in helping my children!

By this stage we had been talking and thinking for perhaps 20 minutes. Time for a change, and leap into the project, so they could see something tangible getting done. I fired up MonoDevelop on the kids PC (Ubuntu Edgy), created a new project, and built a main window in the rough layout we had drawn on paper. (I have installed Mono 1.2.2, although Edgy isn't up to that yet, so I could get the latest version of Stetic for the forms design.)

So they were very quickly introduced to the concept of a window, and widgets on the window. Then I ran the program. It basically showed a form with buttons. I asked them if I thought we had finished building the creature yet. They laughed in that you're-weird kind of way, so I said we had some work to do, and we closed off at that point. Olivia noted however that although we had a program, we didn't have a creature yet, a distinction I think she understands. So that's cool.

After they went to bed I added some plumbing - a timer object and event handler so we could implement the time aspect, a menu bar and toolbar, and a few rearrangements of things. I've got to do as much of the plumbing work as possible, while exposing to them the key conceptual design items.

The project has a name

Splotchitown, hence the name of the blog, is a play on Tamagotchi which is entirely typical of the language-mangling that happens in our household.

Setting the Scene

I decided last week to do a project with my kids. The idea came after seeing how engrossed they are with the Tamigotchi devices we got them for Christmas. For those who don't know, these are little virtual pets. The kids just love them, feeding them, playing games with them, watching their virtual creatures grow and develop.

So I thought 'what if I was to develop a virtual pet program on the PC, and what if they were involved in that process?'

There are some challenges here. I am a software developer professionally, so I know the ins and outs, and I know the complexities that will be faced in developing even something as apparently simple as a virtual pet. But the children have no exposure to software development at all, not even an understanding that someone actually develops these things, that their Tamagotchies are not real creatures, but a program, the output of a human endeavor.

The children concerned are: Olivia (9), Benj (7) and Emily (6). Their ability to understand things differs of course, in particular their ability to understand and manipulate concepts and ideas varies in proportion with their age.

So the challenge is going to be to keep them interested in this project, which will take some time, will involve a lot of thinking and conceptual work, and will result in a game.

It is important in any project to understand the goals. So here is a first stab at the goals:
  • To understand that programs on computers are a human endeavor, and they can be shaped to do what you want. To this end, I want each of the children to see something in the program that they have asked for.
  • To see that something big can be built in small steps, iteratively, improving all the time. To this end, I want them to have some involvement in the planning and execution.
  • To learn something about how to think - different ways to see something. They will each take something different out of it.
  • To have fun doing it, and at the end, hopefully, playing it!
At the start of this project, the gap between what they understand now and what they could understand from this project is huge. It seems a little big - kids surely can't understand something this complex.

But a gut feeling tells me that they will each get something out of it, that they can rise beyond what we expect children to understand. Time will tell!