Dark theme

Picking a language

[ << ]

Scratch, which we used to build our "Hello World" program, is great because it is almost bombproof. With most computer languages you have to write the code by typing into some kind of text editor, but Scratch allows you to drag predefined blocks of code together to do the same job. Because it has set blocks, and because you can only join certain blocks together, Scratch makes it impossible to muck up the syntax or make spelling mistakes. This means any problems are just in what job you've asked the computer to do. You concentrate on the key generic ideas of coding to solve problems, and don't have to worry about the language. This makes it the best language for kids.

Scratch can be programmed on the Scratch website. This coding "environment" helps you write, run, and save your code. However there are other Scratch-like languages and environments where you can write, learn, and save Scratch-like code. Most of them are free.

The tradeoff, however, is that Scratch is limited to doing what the people who invented Scratch thought would be useful, which isn't everything a computer can do. For example, in standard Scratch there's no way to send a message over the internet. In general there's a tradeoff between the power of a language and its complexity, and people who start with Scratch will want to move on at some point (though, actually, its bombproof nature means it is used in the real world for stuff).

Most other languages are written in text files, and then passed to the computer to be compiled into ones and zeros and then run. While you can write most languages in any software that will save plain text (e.g. notepad), usually people write inside a special type of software called an "IDE" (Integrated Development Environment). These help you spot mistakes and compile/run the code.

Because you need some languages that are simple and some that are more complicated, one language will never do everything. Different languages are written to be good for different things and different environments. For example, Java, quite a complicated language, is good for mobile phone programs, while Javascript, a similar, but simpler, language is useful for making interactive webpages. Python is useful for processing data, while Lua is small and simple, so good for letting beginners adapt computer games. Because each language has jobs for which it is better or worse, while some people will learn one language which does all the jobs they need, most will learn a handful. Fortunately most of them work in roughly the same way, just with very slightly different syntax.

Our "Hello World" program was written in a way of talking to the computer called "Scratch". Scratch is a simple way of coding. It is hard to get things wrong, but it was made for games and animations; it is hard to do anything else in Scratch.

There are other "languages" to talk to computers. Other languages are easier to get wrong, but make it easier to do more things. Just as you might speak French and English, you can know more than one coding language. More typing usually means you can do more with the language, but not always.

The first thing you need to think about is which language to start with. Scratch is good because you can't make mistakes with typing, so you can think more about solving problems.

Scratch was made for people starting coding, but it is now used for lots of jobs because it is hard to make mistakes.

Scratch can be programmed on the Scratch website. This coding "environment" helps you write, run, and save your code. However are other Scratch-like languages and environments where you can write, learn, and save Scratch-like code. Most of them are free.

 
So, how do we work with languages? What's inside a typical language? We'll look in a moment.
First, a quick summary.