Greenfoot programming is – on the whole – reasonable straight forward. At least if you know how to program in gerenral. Still, there are a lot of things that can be done well or less well. Here are some of the things I came across while writing a few scenarios that I found helpful.
Maybe you will as well.
Programming is not hard.
Sure, there are plenty of examples you can pull out of the bag that have really brain-numbingly complex algorithms in them, and they are indeed hard to program, but they are really the exception. For most programmers and most programs, this is not the case.
Most programs that fail do so not because the implementation is done badly or fails altogether, but because they implement the wrong things. Its not that the programming was hard, but that they programmed something nobody wants.
Deciding what you should program is where all the beef is.
Welcome back, dear readers, to the fourth part of Sophie’s journey of writing a DrWho computer game with Greenfoot and Java.
I’ll try to make it short today – it’s been a long day, and it’s getting late. But this programming session I’d like to record took place five days ago, I have only sparse notes, and I’d like to get it down before I forget too much. I have been busy this week, so I haven’t had time to write this up earlier, but there was so much lovely and encouraging feedback on the previous posts that encouraged me to continue writing this up.
Thus, without further delay, on to the next task: Reaching the TARDIS with the energy pellets!
The third part of my endeavours to write a Dr Who computer game with my daughter
If you’re reading this, then you probably already have an idea what this is about: An ongoing project to write a Dr Who-themed computer game with my daughter Sophie, who is 10 years old. (Yes, she’s 10 now – it was her birthday earlier this week!)
This is the third part of this story. In part I we got the Doctor to move, and in part II we added some Daleks. This time, we giving the Doctor something to do, something worthy of the last of the Time Lords: Collecting energy pellets for the TARDIS.
This time, I had thought a little more in advance about what might be a good thing to tackle next. Putting floors in, so that the Doctor would just walk on those levels (and ladders to go up and down)? Or other moves: jumping, ducking, etc?
I decided the most interesting thing would be to put some opponents in – other actors that you could run away from, and who could catch you. With the Doctor, it’s pretty obvious who that should be: the Daleks! (They are the Doctor’s prime enemy, after all.)
When I came home from work, I suggested this to Sophie. Happily, she agreed.
First party of a journey of writing a Doctor Who video game in Java with my 9-year-old daughter.
Yesterday, my daughter Sophie asked me to show her how to write a computer game. She is nine. (Well, only a few weeks away from being ten – at this age, a year still matters.) She has never written any code before. Now, there’s a challenge, if I ever saw one.
I am a computer scientist, and one of our projects is Greenfoot – a programming environment designed to teach kids (and older students) to code with Java. So far, that has all been part of my research work. Research into programming education, tool design, etc. I have used Greenfoot with kids (mostly about 15 years old), but more often I do presentations and workshops for teachers.
I have often wondered how low in age you could take Greenfoot. It’s Java, after all, not Logo. 15-year-olds clearly works. But 10 year olds? We don’t know.
So I told Sophie that we’d start making a game tomorrow. That was yesterday. So today was the day. Afterwards, I thought it might be interesting to try to record the process we’re going through — see what happens.
So here is my (hopefully continuing) diary of coding with my daughter… (Our results, live demo and source code, are at the bottom.)
Kathy Sierra, on her excellent blog (which may have very sadly come to a close now, but that’s another long and sad story) has recently published a collection of her favourite graphics from the last few years.
Here is one that I really like:
(By Kathy Sierra, from http://headrush.typepad.com/,
shamelessly copied without permission – I hope she doesn’t mind!)
You should really look at the site yourself – there are many more great diagrams!
The Featuritis diagram above struck a nerve with me, since it’s something that’s been close to my heart for a long time. It is also related to what I think is one of the Natural Laws Of Software Development:
Every open system develops towards the unusable.
If you want to find out why I think that, read on.