Twitter

Sunday, 22 May 2016

Learning to code with games

Disaster has struck - my Raspberry Pi Zero arrived while I was out, and thanks to the unexpectedly summery British Saturday, nobody was in to take delivery, not even the neighbours, so it's now whiling away its weekend in the local sorting office - what with it being Clerkenwell Design Week, with a number of engagements scheduled in the evenings, it looks like I'm not going to be able to start building until next weekend.

I decided not to be too downhearted about it, though. I've had an interesting afternoon instead. While I'm keen to dive right in and get some pre-existing code that I plan to retroactively analyse installed on my pi zero, I figured that I could really use a bit of a refresher in programming.

The big problem I had was that, without any immediate problems (save the fact that the sorting office doesn't open on Sundays, which isn't fixable with code to the best of my knowledge), and without much hardware about the place, I didn't really have a specific coding goal in mind.

Then I thought of Scratch - MIT's programming platform for kids. I haven't played with Scratch for years, but I had a go and sort of enjoyed it, but realised that once again, I didn't have a specific goal in mind, so didn't accomplish much other than fooling around with a few commands (I made a cat do a silly dance).

I then wondered if there are any games that teach coding in order to accomplish gameplay. The two I came across were:
https://codecombat.com/ (Code Combat) and https://code.org/mc (Hour of Code - Minecraft edition)

Firstly, while both aimed at kids, they're definitely games I enjoyed playing. But one thing stood out: I could very easily construct my Hour of Code by dragging and dropping tiles to build JavaScript without ever really understanding what I was doing. CodeCombat was a little better from that perspective: it gave instructions about what different commands were for, but it didn't go into much detail about why they worked.

This is something I'd like to see more of in any 'learn to code' environment. It flies in the face of the way I've planned to build my PiCam, and that has led me to want to review the code before I even get my hands on the machine itself. I'm hoping to be able, with a great deal of help, to be able to begin to understand the code that's going to make my PiCam work. Once again, it's diving in headfirst, but this little afternoon of exploration has got me to a really interesting place: I'm starting to realise the type of questions I'm going to need to be able to ask to get better at this fast.

That, to me, has always been the sign that I'm on the right track.

Wish me luck.

No comments:

Post a Comment