If you want to learn to code, we explain which languages you should learn - right now in 2016 and 2017 - and how to start programming and creating your own apps, websites and more. Whether you're young, old or somewhere in between, programming is not only rewarding - it can earn you good money as a career, too. See also: Best DIY computer kits
Learn to code: where to start
With so many different programming languages and, indeed, types of programming, the first consideration is which languages you should invest your time and effort in learning. Do you want to create apps for smartphones and tablets? Would you like to design and build websites? There's even the programming of the embedded computers which are built into everything from your TV to your car. Each area requires radically different code, so while we can't decide which is best for you, we'll explain where to start looking.
If you expect to be learning to code in full-time education, there’s a good case for working with the languages most commonly used in schools. Alternatively, for those who hope to employ their coding skills in the workplace, we’ll give some thought to which languages are used in industry for various applications. Just knowing which languages to learn isn’t enough, though. So we’ll also provide some guidance on what software you need in order to learn each language and which resources and courses will help you in your quest.
It’s important to recognise that there’s no single best language, though. In preparing this article we spoke with Mark Chambers, CEO of Naace, a community of educators, technologists and policy makers who share a vision for the role of technology in advancing education. Mark was keen to avoid recommending specific languages, indeed the National Curriculum doesn’t require particular languages to be taught.
Learn to code: Resources for kids and teens
2014 was the Year of Code in the UK, and the intention was to encourage people across the country to get coding for the first time. Now, coding is a part of the national curriculum and there are more online tools and apps which are designed to get kids into coding.
Update 9 November 2016: Mattessons (makers of Fridge Raiders) is currently running a Snacker Hacker campaign which involves getting teens (and kids) to solve challenges to beat a hacker, all involving skills required to gain a level one coding qualification. You'll find the website here: mattessons.co.uk/hunt-the-hacker
Another is Apple's Swift programming language. This was introduced two years ago, but now Apple has released a free iPad app called Swift Playgrounds which aims to teach kids to code in Swift using a fun game-like environment. It works on all iPad Air and Pro models, plus iPad mini 2 and later. They will also need to be running iOS 10.
Many people see these new programming tools as the most significant shake-up since the BBC Micro was introduced to schools in the 1980s, a move that saw a huge resurgence in the fortunes of the British computer industry. It will be some time before their impact becomes fully apparent of course, but there’s strong evidence that the interest in programming is high at the moment.
See also: best apps for kids and teens
Learn to code: Programming by blocks
One of the two most commonly used programming languages in schools is Scratch which was developed by the Lifelong Kindergarten Group at the MIT Media Lab. Unlike most languages, Scratch programs are created by linking blocks together on screen. This allows students to learn about the structure of programs and the concept of algorithms but without having to learn syntax, that is the exact textual format of an instruction in a conventional language. In addition, because the blocks resemble jigsaw pieces, their shapes reduce the likelihood of blocks being connected together when the end result would be nonsensical.
The new BBC micro:bit also uses a block-based programming environment called Microsoft Block Editor.
Despite this unconventional approach, Scratch genuinely is a procedural language, as are most of the popular computer languages, but with the notable exception of some of those used in Web design that we’ll look at later. In other words, it allows the programmer to define a sequence of operations for the computer to carry out.
Scratch is often used in primary schools but it would be unwise to set an upper age limit, above which a student should learn a conventional language instead. It’s also used in secondary schools, indeed it could be beneficial for anyone who has never coded before, while recognising that it will always be a stepping stone to the types of language that are used in business and industry. Scratch is available free of charge. You can either download a version to use offline or you can create programs directly on the website. Another block-based language that is gaining popularity is Google Blockly – see our guide to getting started with Blockly
Learn to code: The BASIC alternative
When there was last a big push on teaching computing in schools, BASIC was the language of choice since it was available on the BBC Micro as well as on many of the cheaper home computers of the time. Although it was designed as an educational language, though, BASIC’s continued use for learning to programme is the subject of some debate. Some would argue that it’s an old-fashioned language that will get students into habits they’ll find it hard to break when they start to learn newer languages. Others say that, because it’s such a simple language, it better parallels the way processor work than more modern languages and is useful because it provides this insight.
Pragmatically, BASIC is still taught in schools quite extensively because it’s more familiar to a large number of teachers. What’s more, in contrast to the “bad habits” argument, there are suggestions that it’s useful to learn different programming paradigms, something that studying newer languages alone won’t provide. All of this seems to suggest that BASIC is still a good language to learn, at least as part of the mix.
In its 50 years, BASIC has spawned a huge number of dialects. Newer versions of BASIC include concepts such as block structure and object orientation but there’s a lot to be said for sticking with a version that is true to its roots. For a fairly basic BASIC, but with extensions to carry out graphics programming, SmallBASIC (not the same as another variant of the same name published by Microsoft) would be a good choice – it’s freely available from http://smallbasic.sourceforge.net. Note that Microsoft’s Visual Basic (formerly called Visual Basic .NET and commonly still referred to as such), is very different from BASIC of old. Indeed the current version of Visual Basic is object oriented (which we'll explain in the next section) and is another possible contender if you want to learn this type of language.