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.
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 and application development, 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.
So, how do we work with languages? What's inside a typical language? We'll look in a moment.
First, a quick summary.