Usually, these are more focused on I/O and making the machine output interesting things like visual charts and sounds (something that is more immediately satisfying and therefore keeps the student's attention).
I tried a rather ham-fisted restaurant menu example below, but that's boring as hell. I wonder if there's something better?
I really think a nice simple language like Python is a good choice - python has a few WTFs for beginners, but the more immediate visual niche languages give immediate payoff (good) but then later their impracticality re-enforces to the child that learning it was a fun intellectual exercise but ultimately useless.
Challenge: Whats the shortest, simplest, most appealing python program we could use to teach kids? I dont know the answer to that, but it's fun to think about :)
This is an important one. We bought our first house 5 years ago and I've been busy completely renovating it. I often get asked how I dare take on such a big and daunting project with no prior DIY experience - the answer is, it's basically what I do for a living!
Let's not teach kids higher-level organizational skills, but save those for later. For kids it is important that they can play, and fail often.
When they start off coding, it might mean an entire week spent in a single python file:
The 50,000 foot view might be "Printing Restaurant Menu", the "line of code" view, might be getting the price of pizza.
We're not talking architecture, or operating systems, or networking, or boolean circuit logic, or anything, we're just printing their favourite food menu - a practical example of shifting perspectives.
Once they can shift easily, then we expand it in both directions - Now print menus for 10 restaurants. Now find the most expensive pizza.
I think these lessons can go hand in hand with Math -- too often the main complaint with Math is that it's too abstract (When am I ever going to use this?!) whereas if the Math lesson about averages tied into the coding lesson for printing the menu (Now find the average cost of all pizzas) kids might be able to see it as useful
I think the important thing here is that kids need to see the necessity first. Only then can they start to deal with more abstract concepts. And actually, I don't think this applies to only kids. I think it is the reason that "learning by doing" is so much more effective than anything else.
To give an example related to programming. I have seen CS students use preconditions and postconditions (i.e., assertions), on functions, without understanding why they were using them. They just wrote those assertions because the teacher said they had to do it. Of course, the assertions are useful, but only for large, more complicated, programs. But since the assignment programs were all small, the usefulness of this particular software engineering instrument completely eluded them.
Just kidding, your absolutely right. I just think we need to find a good way to communicate this to kids in an understandable way.
- The ability to break up large, seemingly daunting problems into smaller manageable chunks.
- The ability to shift perspectives from the 50,000 foot view, down to the individual line of code view, and then back up to the 50,000 foot view, and then back down again!
Variances in individuals abilities can be accounted for - jack might only be mentally capable of going to the line of code level, but I can see Mary is getting bored, so she can look at the interpreter source code - they should be encouraged to seek answers themselves.
I have a close friend who is the head master of a school here in the UK, and he is really keen to get kids coding, but there's no source materials for the teachers to learn, I think there's opportunity there for anyone who wants to pick it up :)