Codecademy

My boyfriend and I discovered Codecademy over Christmas 2013 – neither of can remember how we first found out about, but we started off competing against each other to see who could get the furthest in Python. When I started teaching coding to years 3 and 4 in January 2014 and started to run my Code Club with Year 5 and 6 I thought it would be a good idea to show the children what they could learn to do – at that point in time I’d just managed to code a PygLatin generator in the Python tutorials (rather upsetting for me, this has now been changed and made easier so that it no longer has a clause for changing the code if there is a vowel at the start of the word). Anyway, I rather proudly showed the children my lines of code and explained that their eventual goal would be to write code like that.

After two terms of Code Club, I have three boys who are entering Year 6 in September who are now over 30% through learning Python and determined to get ahead of me (they quite possible already have now!). More surprisingly, I have a young lady from the same class, who joined Code Club in Term 2 and isn’t a particularly enthusiastic computer user, however, she has now made it her goal in life to work through Codecademy, no matter what the cost – for me this is one of the biggest achievements of the group as she is an average achiever with confidence issues – she’s doing something now that barely anyone in school can do so she doesn’t feel like she’s competing with anyone or going to fare badly compared to other people so she can be independent, make mistakes and it doesn’t matter. She mentioned trying to work through some of the problems at home and asking her parents and older brother for help only for them all to exclaim that it was too difficult for them – this made her day!!

I’ll start with a brief warning – this website is NOT made for children, it is aimed at adults like me who want to expand their knowledge and so sometimes the wording of the text can be really tricky for the children to understand. Please do not expect this to be easy to follow – I’m still confused and find things tough and I’m only up to 33% – my partner gave up around the 75% mark, but only after I helped him with the early on logic stages (he just couldn’t get the hang of not, and, or!).

Since I first signed up, Codecademy has gone through a bit of a facelift – it’s all shiny and posh. The children usually sign up with their school Gmail accounts – fortunately it doesn’t seem to require any email activation so we can use their school accounts without any emails bouncing back!

Screen Shot 2014-07-19 at 20.19.07    Screen Shot 2014-07-19 at 19.57.54

They also seem to allow you to learn a huge selection of programming languages.

Screen Shot 2014-07-19 at 20.22.52

But for now, let’s just start with Python – you’ll notice that it says on the picture above that I’m only on 30% – this is a rather frustrating and bizarre issue with the site. Since I first started, the Python programme has been revamped meaning that, as mentioned above, in some sections, such as PygLatin, the code has been simplified – I’ve done the more complex code so that means I’ve managed to complete more than 100% for some sections, but I’m still only about 30% through the new course.

Screen Shot 2014-07-19 at 20.25.17

This issue nearly caused two boys to fall out one week because, for no apparent reason, one child was 1% ahead of the other even though they were on the same page – it turned out he started working through the course a week earlier and in the meantime it had been updated.

Anyway, let’s take a look at lesson two of Python to give you an idea of the layout:

Screen Shot 2014-07-19 at 20.28.14

On the left of the screen is some information, your instructions and then a hint box. The main body of the page allows you to enter your code and the black box in the top right is the action box where any printed code will appear (for example if you do some maths in Python, the answer will appear in the black box – this will also be where any error messages will appear if your code is incorrect). The big blue button at the bottom will go green if you’ve solved the problem.

Screen Shot 2014-07-19 at 20.30.48

The instructions start off fairly simple – you just learn what some of the different terms mean, but they quickly get quite complicated:

Screen Shot 2014-07-19 at 20.46.16    Screen Shot 2014-07-19 at 20.47.41  Screen Shot 2014-07-19 at 20.47.18

When the children first started having a go at Codecademy, there were a few times where I thought I’d never be able to help them, but in all honesty, helping the children has really helped my own understanding and I feel quite confident now with debugging the first 30% or so. Now I just need to find the time to push myself further through the course.

As with the Code Club resources, the children began to help each other solve issues – the most common ones were indentation – realising that after certain statements you need a colon and to indent the next line 3 spaces or one tab (turns out this is a common problem with all coding) and forgetting capital letters. Codecademy itself is really pedantic about this even when looking at strings, which are generally user defined rather than part of the code. I honestly couldn’t count how many times we had the following error message:

Screen Shot 2014-07-19 at 20.52.15

Still, at least the children were being encouraged to read their error messages (my general policy for a lot of help the children asked for was to say “work it out yourself” – harsh, but necessary).

Since the children who were working through the Code Club Scratch resources were earning certificates I decided to create* a certificate for Codecademy for achieving 20%, but since it got so difficult after that point, I decided to start giving certificates for every 10% after that!

Screen Shot 2014-07-19 at 20.58.02So, Codecademy is a great resource for someone with a desire to learn to code properly. I would actually recommend that any teacher who wants to teach Computing at least have a go at one of the languages, if only to get an idea of the structure and that all important syntax. It is sometimes frustrating, sometimes downright silly and sometimes so difficult it makes you want to cry, but there is a massive sense of achievement when a piece of code does what you want it to and if my 9-10 year olds can have a go then anyone can!

*I say ‘create’, but what I mean is ‘filled in the gaps on a template’ on Pages for the Mac 😉

Advertisements

Code Club

Last Autumn my school was approached by a parent who worked for one of the big investment banks. He came to us as a representative of CAS, which, at the time, was an organisation I’d never heard of. Computing At School had been one of the many groups petitioning the government for a change in the curriculum and had a goal of supporting teachers and schools with introducing the new curriculum. He also mentioned a useful coding scheme of work called Code Club.

Within an hour of him leaving, I had already signed up to CAS and was investigating Code Club.

CAS is a great site, however it can be quite confusing and intense unless you have something specific in mind. I love the ideas behind it, but for a novice like me, I can find it all a bit overwhelming. Also, when I first signed up, it automatically sent me daily update emails, which just seemed to clog my inbox and annoy me. Now that I’m a bit more confident, I know I can use CAS to look for resources, as long as I know what I’m looking for, but I still wouldn’t go there instinctively. The other problem is that a lot of the resources, though helpful, are made with the assumption that you have some prior knowledge, which is not always the case. Having said that, I downloaded a lovely physical computing lesson plan which involved the children physically being a search engine (as a way of explaining how the world wide web and search engines work). One thing that CAS is really keen on is what they call ‘physical computing’, which does seem to be a great idea. Instead of explaining binary, act out binary, instead of explaining that your code syntax must be correct, act out being a line of code and see what happens when you misspell things or put them in the wrong place.

Anyway, I also started to look at Code Club and the first thing that CC asks you to do is to search for a volunteer – this is my problem with the site – I spent a good few weeks mindlessly emailing their lists of volunteers, most of whom didn’t reply at all and the two that did both sent a terse “no I’m already running a code club” back. It would be helpful if volunteers could tick a box saying that they don’t want to be approached by any other clubs when they find one. From my experience, most club volunteers directly approach a school because they have some connection with it (the parent mentioned above did offer to help, but only if we could run an 8am club, which I just don’t have time for). Anyway, disheartened and a bit cross, I took the plunge and decided to run the club myself; I really wish I’d done this from the outset as it would have saved me a lot of time and effort, particularly since the resources are so well written and easy to follow.

When I last looked, there were 4 terms of code club resources, however, their aim is to have 6 full terms of information. The first two terms are titled Scratch and Advanced Scratch, then CSS and HTML, followed by Python.

The first term contains three ‘levels’ of Scratch games to make: each level has three games in it. My first reaction was that the children would finish it all well before the end of term – 9 games, 9 weeks right? How wrong I was….by the end of term 2 I had 3 children that finished level 2 and that was the furthest anyone got….having said that, we did get distracted by Raspberry Pi and Codecademy, but more on that later.

What I really liked was that not only did you get instructions and ideas, you got detailed guides for the children (printed, laminated and stuck in a lever arch file), guides for the teachers, cool ‘badges/cards’ that can be laminated as proof that you are part of the club (never underestimate the power of a laminated card), you get certificates to print out along with the twelve original Scratch cards and three more which they have created themselves because they feel they are important skills too. There is also a register with a handy tick-chart to monitor progress, which I left in the front of my folder and allowed the children to tick off when they had finished a project.

So, here’s what I did (spot the OCD teacher here) – I printed off each of the projects (nine in total), I laminated four copies of each, hole punched them, threaded them with a treasury tag and allowed the children to work through at their own pace. The initial plan had been to work on a project each week with a whole class input at the start, but the children worked at such wildly different rates and became so independent that I didn’t need to input, I just had to be on hand to debug AND after a few weeks, the children began to debug each other, which was such a wonderful thing to observe!

The first project, Felix and Herbert, was fairly simple and most children managed it without too much support – most children didn’t notice the instruction to click the button to stop the cat rotating and keep him on a horizontal axis, but otherwise there weren’t any problems except a slight delay with a costume change from a mouse to a ghost that seemed to be a flaw in Scratch rather than anything to do with the programming.

There were  a few problems with Whack-a-witch when the sound file only played intermittently and occasionally the witch disappeared never to return, but again these seemed to be Scratch problems rather than any issue with the code and the classic ‘save’, ‘close’ and ‘reload’ seemed to do the trick.

The third project, called Fireworks, involved teaching a few new skills as the children had to import 5 image files and a sound file, which I simply emailed over to them and got them drag and drop onto their desktop then they had to navigate the Scratch interface to access the desktop and import the files. I also had a few issues with the suggested code – I’m not sure if it was meant to be deliberately wrong to encourage children to think for themselves, but the gist of the project was that the firework shot into the air, banged and then turned into an explosion picture before disappearing. The code given by Code Club wanted you to use two separate sprites and have the rocket sprite disappear and be replaced by one of the 4 explosions (in a random colour), but I found it more elegant to simply have it set up as a secondary costume and then when the instructions asked you to make the firework select a random explosion, setting all 4 as extra costumes and asking the programme to select one at random made much sense than getting it to chose a random sprite (if you’re not sure what I mean by sprites and costumes please take a look at my earlier post about Scratch).

I haven’t needed to help the children who worked through level two – they were confident enough by that point that they helped each other through any problems and so any problems they came across were sorted out without me needing to be involved – scary but true.

Having said that, one of the main reasons I haven’t been helping the children working in Scratch as much is that I got distracted by learning about the coding language Python on the website Codecademy and working with a handful of children who had decided that they wanted to move on from block based languages and sink their teeth into a real, wordy programming language…..

Scratch

Before I start, I should point out that Scratch is completely free and can be found here: http://scratch.mit.edu/

I was first asked to use Scratch about a year ago and I had no idea what I was letting myself in for. I hastily scrabbled around the Internet and found a couple of videos on the Scratch website. They weren’t as useful as I hoped and I admit to giving up fairly quickly.

I have since learned that from the Scratch website you can get hold of a fabulous resource called Scratch cards which are just simple user guides; these are absolutely great. In my previous post I talked about using Espresso Coding as a gateway and this was my next step once the more able children realised the limits of Espresso. I simply printed and laminated 4 copies of each Scratch card and placed them inside plastic wallets in a ring binder folder – the children all helped themselves to the cards and worked their way through them – all self differentiated. By the end of the the first lesson the class seemed much more independent and optimistic about coding and, with Scratch, they had to think more carefully and thoughtfully about what to produce.

Even better, as some children became more confident, I was able to start pushing them onto the harder Code Club Scratch resources and by the end of one full term of coding, I had several Year 3 children who had completed the whole of ‘Level 1’ of Code Club (which is aimed at Year 5/6 children). I’ll write a separate post about Code Club, however, as there is so much to say about that.

The basic set up with Scratch is that it is what is known as a ‘block-based’ coding language. That is, you drag and drop blocks in order to build your code. The children are expected to realise fairly early on that if you don’t put your blocks in the right place, things don’t do what you want.

It functions in its own operating system meaning that it can be confusing for children to figure out how to save (things aren’t in their usual place), but once you’ve got the hang of the basics, it becomes fairly simple to use.

ScratchYou’ll see from this picture that you have four main sections to your screen – the block selection tools, the code box, the image you’re manipulating and the sprite selection.

The first thing I want to talk about is the sprite, which in Scratch refers to the thing that you want to manipulate and make move. This is separate from the background – you will notice on this picture that in the bottom right is both a white space and a tiny cartoon cat – the white space is the background, which can be changed, but not animated, as well as the current sprite, the cat. You can have as many sprites as you would like in the screen, but every time you write a piece of code, it only appears, and only works, for the sprite you currently have selected. You will not be able to type any code if you have the background selected and one of the most common mistakes I come across is children inputting their code onto the wrong sprite and then being frustrated when it doesn’t do what they want. You can also delete sprites either by right clicking or holding down control and clicking – any new document in Scratch always starts with a blank background and the cartoon cat.

Sprites can either be imported from the large selection Scratch provides, or you can draw your own using the paint tool – I even imported a photograph of myself once and made myself into an exploding firework.

The large box on the right is basically just the action window where you can see whatever it is you’ve coded so doesn’t need masses of information – I will draw your attention to the red dot (stop button) and the green flag (go button) as well as the mini tool bar containing an arrow (to select things), a stamper (to copy and paste code), scissors (to cut code) and two tools which will enlarge or shrink your sprite – I’m hoping they are fairly self explanatory so I won’t go into too much detail here!

The left hand column lets you select what type of code you want to build – you can see I am currently in the ‘motion’ section which allows me to select what movements I want my sprite to make – below are the control, sensing, looks and sound menus just so you get an idea of what you can do.

Screen Shot 2014-07-18 at 16.41.44     Screen Shot 2014-07-18 at 16.43.38    Screen Shot 2014-07-18 at 16.43.25     Screen Shot 2014-07-18 at 16.43.31

You’ll notice that some of the blocks have drop down menus – you can adjust what things do once you’ve dropped them into the coding section and can even embed them within each other.

When you are ready to start coding you simply drag the blocks into the code window and you’re good to go.

So let’s look in detail at the code window in the middle – it is from here that you can manipulate things – whether it be the sprite or the background. Starting with the sprite, you have several options from the outset:

Screen Shot 2014-07-18 at 16.52.25

Firstly in the top left you can either set it so that the sprite can rotate 360 degrees, flip horizontally or always face the same way. You can rename your sprite in the box next to it and export you sprite (if you’ve drawn a picture you want to keep safe or share). Below this you have “Scripts”, “Costumes” and “Sounds”. The Scripts tabs is where you input your code so that is fairly self explanatory, but the Costumes tab allows you to have a sprite which changes it’s appearance completely when a certain action is completed; the classic Scratch example is that there are two pictures of a cat, one with it’s left leg forward, one with it’s right leg forward, by switching between these two pictures you give the cat the appearance of walking. The code you would input would be along the lines of “When flag clicked, switch to costume 1, wait 1 second, switch to costume 2 wait 1 second” and then contain it in a repeat or forever loop (found in the actions tab)…..I realise I could’ve shown that sequence visually, with another screen shot, but it’s key that you start thinking in terms of what you are actually asking the computer to do in order to help understand how coding works.

Finally, the sounds tab allows you to import, or even record your own sounds that can be coded to occur when specific actions happen to the sprite.

I’ve only really Scratch-ed the surface here (get it…), but I just wanted to let you know how simple and effective this software is, once you get your head around it.

My next post will be about the Scratch resources supplied by code club and over the summer I really want to get to grips with GPIO Scratch on the Raspberry Pi, so you can probably guess that I am a big fan of this software. Please, feel free to email me if you want some tips and advice, but please bear in mind I’ve only really got to grips with Scratch since Spring 2014 so I may not always be able to help.