I taught 4 year old children about programming and robotics with the Lego Mindstorms Kit.
We made a simple car-bot and rigged a marker on the back end so that when it moved, the marker would draw lines on a huge sheet of paper.
After they saw what it would do, we played around with some of the built-in programs and watched the patterns change.
Then I asked them to map out on a large piece of paper (each kid had their own) a course for their robot. AT this point, they thought they were just pretending :)
Next, we cut out paper squares that looked like the programmatic code blocks in the Lego IDE.
First, I showed them what each individual code snippet meant. Start. Stop. Pause. Go Left. Turn around. Turn fast. Carve. Spin. etc.
Then we decided on a starting point on each child's drawing and began. If the kids put Turn Left before including Start, we talked about it. IF the kids contested or didn't believe that it wouldn't work, we tested it.
Each kid could edit their program in the IDE whenever they wanted to test a theory.
As more theories were tested, the kids quickly learned that they were in charge of every 'thought' their robot was having.
In the end, most programs reproduced the original drawings with surprising similarity. Some were even crazy similar.
This is way too slow for a 9 year old, but Lego Mindstorms has a tournament/league. Check at your kid's school or inquire around town. Could be possible to get him in there.
I volunteered at a league meet once and had a blast. The robots were very sophisticated and the solutions for solving the problems were great.
I just wish I could have done something like that when I was a kid.