Thursday, 22 March 2012

Teaching secondary students to code

Scratch is a great introduction to programming
I taught some students to code today. The thing is, I never thought they would enjoy it as much as they did, but when one student exclaimed "this is really cool sir!", it was clear they were genuinely interested in understanding how programs are made and computers work.

Truth be told, this was a 'stretch and challenge' task for a few particularly good students, but it did get me thinking again about whether the whole class would have enjoyed the task, and how I could have made it appropriate for them. This particular task was to do with learning SQL - a language used to talk to databases, which I haven't taught to anybody below sixth form until today, so it was great to see how the year 8 students took to it.

So what languages and tools are appropriate for our students? Here's a few of my thoughts, with ideas rated on ease of use, worthiness in the ICT curriculum, and usefulness outside of it in the real world.

Scratch is one of the basic tools most ICT teachers will have dabbled in at some point. It's fairly basic with a nice drag and drop interface, that can give kids a really nice introduction to coding.
Ease of use: 9/10
Worthiness: 9/10
Usefulness: 0/10 (Nobody is going to buy something you make in this!)

Game Maker 
Game maker is one of my favourite discoveries ever. I've been using it for 6 or so years now and it's fantastic. I make a basic game for students with a flying saucer that has to get to a diamond through a maze and they run wild on it. I've seen some amazing stuff created with this from 11-16 year olds. Another great thing about it is you can use the drag and drop interface, but there is the ability to code in it too.
Ease of use: 8/10
Worthiness: 9/10
Usefulness: 1/10 (It can make executables to share, but again, it's unlikely you'll make your millions with it)

Excel & VBA
GCSE ICT has often involved Excel spreadsheets and students have produced some great things in them. Excel is also able to record and run macros, and you can then look at their code (which is in Visual Basic for Applications, or VBA code). Once they've worked out how the basic commands work, then can then experiment with IF statements, Loops and so on. This a really nice introduction into programming and it's incredibly useful in lots of situations. I'm well aware that many people want to move ICT/Computer Science away from spreadsheets, but I'm really not sure why - I think they're great! 
Ease of use: 7/10
Worthiness: 7/10
Usefulness: 7/10

What websites are made of. Simple and effective and reasonably easy to learn the basics. The best thing about these skills are that you can make lots of money from them. I've had students sell websites they have made using skills they've learnt in lessons. It's actually quite exciting to many students when they work out how to make a web page blue!
Ease of use: 7/10
Worthiness: 10/10
Usefulness: 10/10

SQL is a language used for talking to databases. I use it in web development all the time and it's not majorly complicated. The problem with this is it's not all that useful unless you know how to use something like PHP (see below). Still makes for an interesting lesson, and you can test it in an Access database.
Ease of use: 5/10
Worthiness: 7/10
Usefulness: 6/10

Server side scripting - this is where it gets a bit tricky if you go beyond the real basics. The plus side is the language is really powerful for web development and uses a lot of familiar programming syntax. It's great, as long as you've got a suitable test platform, which is a problem for some. Having said that, we've just brought hosting for about £50 a year, which does our A Level students fine.
Ease of use: 4/10
Worthiness: 7/10
Usefulness: 7/10 

The conclusion
There's loads of other ways of teaching coding to kids than the few I've mentioned above, but those are the main ones I use. I love to try new things with my classes, so if anybody reading has some ideas that have worked well for them, please do let me know!