Teaching My Daughter To Code

First party of a journey of writing a Doctor Who video game in Java with my 9-year-old daughter.

Update: Part II, Part III and Part IV of this story are available now.

(Note: This post is more than 10 years old. Some of the Greenfoot code shown can be written more easily in newer versions of Greenfoot, using newer API methods.)

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.)

Continue reading

Back to basics – new Greenfoot video

Recently, I have announced the first Greenfoot tutorial video. Not an overwhelming success as yet (no nominations for Academy Awards or Emmys, no calls from Warner Bros. or the BBC). As far as I know, maybe not even a viewer yet… Alas, I shall not be discouraged. If nothing else, it gives me somthing to look back on in a few years and laugh at how funny my voice sounded…

The idea with these videos is to provide random tips and techniques of doing various things in Greenfoot. However, equally random as the choice of subject for these videos is my order of producing them: I started with “Making explosions” – a rather advanced tip for blowing things up. Not really the first thing you need to know when getting started with Greenfoot.

The idea is, over time, to build up a collection of short tutorials that cover a broad range, from basic tips to more sophisticated techniques. The order in which they will appear will, however, remain somewhat random. I record them according to whatever I happen to have on my mind at the time.

I realise, though, that the basics — getting started — is really what most people need to know right now. So I have recorded a first general introduction. Not really a programming tip, but a very quick overview of what Greenfoot is and what it can do for you. So if you are one of the great majority out there who haven’t got a clue what Greenfoot is, here’s a thing for you to look at and find out.

More to come in the near future.

Making explosions – a Greenfoot video demonstration

Explosion

Many of you probably know that I am working on the Greenfoot project. The software itself is in public release and is very usable. What is lacking at the moment is documentation – good instruction that tells people how to do things.
Creating this documentation will be one of our main tasks over the coming year or so. This will take various forms – web pages, a book, work sheets, examples, videos…

I have decided to make a start with some videos. They will be slightly random in order, showing things which I happen to have on my mind. Over time, though, I hope to build up a collection that is somewhat ordered: starting with basic tasks, and moving on to more sophisticated things.

So, here is the first batch: it shows you how to make a nice-looking explosion in Greenfoot. The video tutorial is sliced into three parts, just to keep the file size manageable.

The Greenfoot Video Tutorials

Making Explosions, Part I (length: ~5 min, 11.6 MB)
Making Explosions, Part II (length: ~18.5 min, 57.9 MB)
Making Explosions, Part III (length: ~15 min, 52.2 MB)

These are all published under the Creative Commons Attribution-NonCommercial license.

You can also get the source code of the project developed in the video.

Have fun. And let me know if you turn this into an interesting Greenfoot scenario!

I Object

A change occurred recently in the discussion of introductory programming teaching: the procedural backlash.

Suddenly, respected and experienced teachers start claiming that teaching object orientation early is not only difficult, but impossible. Procedural programming once again is supposed to be the solution, with objects having to take a back seat.

This development is not only questionable and unfortunate, but wrong and dangerous.

Read the full article here.

Is Java on the way out (of teaching, anyway)?

Java has undoubtedly been the most popular language of the last decade.

It has taken over large parts of the educational and professional sector. It is its use as a language for programming teaching that I want to talk about today.

Java has been dominating introductory programming teaching at universities for years now. But is it time to throw it out?

Continue reading

To complete or not to complete

Complete
Some thoughts on auto-completion and auto-formatting.
At the BlueJ team, we regularly get requests for new features. Two of the most requested features are auto-completion (of method names, imports and fields) and auto-formatting (a.k.a. “pretty-printing”) of code.

We have had these discussion since the very first release of BlueJ. So far, I have always refused to include these features. Is it time to re-think?

Continue reading

What’s wrong with syntax colouring?

Syntax colouring – the annotation of source code with different colours for keywords and other syntactic tokens – has become standard in just about all development environments. Yet, it often does not make sense.

I don’t mean to say that it does not make sense at all to use colour to annotate source code. On the contrary. What I am saying is that almost all syntax colouring systems colour the wrong things.

Continue reading