Can you learn to code... for free?

Posted by s.hettrick on 14 February 2014 - 10:20am

By Simon Hettrick, Deputy Director.

There's been a recent drive to get people to learn code, which has led to a few notable victories like the inclusion of coding in the national curriculum, and initiatives like the Year of Code. A recent article in the Guardian listed ten places where anyone could learn to code, but they required quite a lot of time and money to be dedicated to the cause. What happens if you want to learn to code in your spare time and don't want to pay for it?

Being the Institute's resident non-coder, I was given the task of investigating some of the free resources available to help people learn to code. The following are some of my favourites.

1. Code Academy: best for time-pressed beginners

Code Academy takes an absolute beginner ("What's a loop?") and teaches them the basics of a few popular languages, such as Python (my language of choice for this experiment), Javascript, Ruby, PHP, HTML/CSS (okay, they're not languages), and even APIs for sites like Twitter.

Like many of the online courses, Code Academy's lessons are embedded in a browser alongside a terminal window (lingo: the window into which you type your code) and an output window (to show what your code does). I'm a fan of learning in this way, because the lessons, the code and the output feel connected and you quickly see your results. It also means that it's easy to get hints when your code is not working correctly.

I was impressed with Code Academy. The lessons are targeted well and the difficulty ramps up at a rate that feels challenging without being overwhelming. I'm a good way into the Python lessons and I am yet to grip my monitor with both hands and yell threats into it - which is a good sign. The coding examples are meant to represent real life scenarios (e.g. calculating the cost of a holiday). These things always seem a little artificial to me but, as far as examples go, they help give sense to why it's useful to learn to code.

If you want an introduction to coding, you want to get started quickly and you want to pick up and drop your lessons when you have the free time, then Code Academy is the site for you.

2. Learn to Code the Hard Way: best for hardcore beginners

Learn to Code the Hard Way sounds pointlessly masochistic, but it in fact represents a departure from the use of browser-based terminals favoured by sites like Code Academy. Instead, it provides instructions on how to write code using a text editor (a different one for Mac, Windows and Linux) and tells you how to run the code using a terminal on your own machine. That's pretty easy on a Linux or Mac machine, and only slightly more difficult on a Windows one. The first thing that anyone will do when finishing a browser-based course is wonder how they code for real on their computer, and Learn to Code the Hard Way circumvents this problem by starting you off in the real world from the first lesson.

Learn to Code the Hard Way forbids you from copying and pasting from the lesson: every single character must be typed in by hand. I'm not a fan of the spare the rod approach to anything, but I have to admit that in this case it suits the discipline needed to learn to code. There are many times when I thought I'd understood something, only to find my comprehension completely lacking when it came to writing the code. The must type everything approach ensures that you concentrate on the code that you are writing and the weird and wonderful syntax that is necessary to keep your computer happy.

I focussed on the Python tutorials, and found them to cover a wide range of subjects at a level of detail that was understandable to a beginner. The rate at which the difficulty level increased was good too. In addition to the syntax, Learn to Code the Hard Way passes on a lot of tips about coding in general - and this is where it stands out from the other sites. I particularly liked the tip on reading your code back-to-front, which breaks familiarity and makes it easier to spot mistakes.

Learn to Code the Hard Way is not as easy to dip into as a browser-based system like Code Academy, but it compensates for this shortcoming by insisting on a stronger foundation for your coding, communicating some insider knowledge and providing an excellent and comprehensive series of tutorials.

3. Hour of code: best for absolute beginners (and kids)

If Learn to Code the Hard Way is at the spartan side of training, then the Hour of Code is at the end with the comfy chairs and cocoa.

The basics course starts at a much simpler point than any of the other courses described here. Rather than presenting the beginner with a terminal, the focus is on learning the conceptual side of coding using a graphical programming language known as Blockly. Rather than worrying about where to place a semi-colon, you get to concentrate on moving familiar characters from Angry Birds and Plants vs. Zombies using a series of simple instructions: forwards, turn right, etc. (highly nostalgic stuff for anyone from the Big Trak generation).

If it's a beginners course you want, the Hour of Code website delivers. The site's aimed at children, and I'm a little torn on whether it's useful to adults. If you've never studied any coding at all, then the basic introduction is a good place to get to grips with coding concepts - loops, for example, are explained very clearly. However, the early lessons may feel a little too frivolous to those with a bit of coding history. Saying that, if the basics course leaves you hungry for more, then there are links to courses where you can learn app development and languages like Python in detail.

If you have never coded before, or if you are looking for a site where your kids can learn, then Hour of Code is the place to start.

4. Code School: best for the unconventional

Code School has me conflicted. Code Academy and Learn to Code the Hard Way take the conventional approach to coding: start with "Hello World", move through the subjects of variables, arrays, conditionals and loops, then start on to the hard stuff. The introductory lesson from Code School takes a different approach, and I'm genuinely unsure whether it's a good one... but it certainly makes the course enticing. The aesthetic of the site is rather nice too.

Code School doesn't have a course on Python, so I was forced into the even more unfamiliar territory of Ruby. After entering a few commands for simple additions, the tutorial moved directly onto applying methods to strings. Now that's a bit of an entry at the deep end if you ask me (especially if you're trying not to get confused with your newly learned Python syntax), but it made a perverse kind of sense. Rather than getting hung up on printing and arithmetic, skip to the more difficult stuff that shows why it's useful to learn to code. It's the equivalent of learning "Je voudrais une bière s'il vous plaît" before "Le singe est sur la branche".

It might be best to learn the basics of Ruby, Javascript, iOS or HTML/CSS from another course, but if you want to quickly get into what code can do for you, then Code School is worth a shot.

5. Bentobox: best for everything!

A bit of a cop out on this last item in my list, because it's not a course but a gateway to courses. Put together by Jon Chan, Bentobox lists a huge range of technologies - about 80 of them - and packages them together in an accessible way with links to courses where you can learn more.

If you want to learn a new technology, then Bentobox is the place to find a good course.

And there's more...

There's no shortage of resources that will help you learn to code. In fact, the proliferation of these sites is the reason that we decided to write this post. The above list is not meant to be comprehensive, it just covers a few of the sites that I feel give a good introduction to someone - like me - that is new to the field. If you have better suggestions then please comment below!

And here are some of the other sites that look good, but I didn't have time to review:

Share this page