CodeYear - Learn to Program

Apparently even the mayor of New York is learning to code, as part of a campaign called Code Year launched by a bunch of companies working together.

Needless to say, I applaud his decision. Coding certainly teaches logical thinking (usually a good thing), and it also - perhaps more importantly in these difficult economic times - practically guarantees you well-paying work if you can learn to code reasonably well and are able to summon the motivation to surf a few job sites and send off your CV. There are also many people like myself who work as self-employed coders, consultants or instructors.

But let's say you want to learn to program computers, which language should you learn?

Here's the quick Cave of Programming guide to programming languages.

It won't cost you anything to learn the languages below (aside from any lessons that you may pay for of course!). All the software you need to develop code can be found free on the Internet.

Java


Java is one of a small handful of really serious heavyweight multi-purpose languages. While you can write games and pretty much anything else in Java, it's more often used to create mobile phone software, cross-platform desktop applications and web sites of the sort that your bank is likely to use to provide Internet banking services.

C++ (and C)


Another extremely serious heavyweight language, C++ is used for pretty much everything, including high-end computer games, mobile software, software that runs your washing machine and even other programming languages . It's less often used for websites than Java, and more often used to create software that needs to perform at the cutting edge of your computer's resources. C++ was originally developed by adding stuff on to its parent language C. C is still sometimes used when system resources are very tight. You can do absolutely anything with these extremely powerful languages, but they are correspondingly more difficult to use correctly than slightly "higher-level" languages like Java.

Javascript (Plus HTML and CSS)



Javascript is a programming language that's embedded in web pages, which are basically built out of HTML and CSS. So if web pages are your thing, Javascript, HTML and CSS are things you'll want to learn. It's not really suited to developing games or anything really complicated like that; it's more just used to build basic functionality into web pages (drop-down menus, graphics that change when you move your mouse over them, page counters etc). That looks set to change, however, and in future Javascript may well be used more often than currently to create full applications that work in your browser. It's already used to create things like Google Maps, Google Docs, etc so can potentially be quite powerful.

PHP



PHP is solely used to create websites; for example, the one you're looking at now. The well-known and widely-used website content managements system Wordpress is built from PHP for instance, so PHP is good to know if you want to customise your blog or website. To use PHP effectively, you need to know HTML and CSS too; - the basic building blocks of the Web.

Perl


Perl is often used to create websites, but is being supplanted by more web-specific technologies. Perl stands for "Practical Extraction and Report Language", and as you might imagine, it's great for dealing with huge amounts of text-based data, processing it from one format to another, producing stats from it or creating websites out of data.

Python


Python, like Perl, can be used to create websites and to process data. It's a little newer and trendier than Perl, and you can also create games with it -- although serious game developers are more likely to use C++ or Flash.

Action Script (Flash)


Action Script, often abbreviated to AS2, AS3 etc. (the current version at the time of writing is AS3) is a language that's used to create Flash programs. Flash is a technology that lets you embed programs in web pages; take a look at YouTube or any of the zillions of Flash games around if you want to see examples of AS3 at work. Although Flash is a proprietary technology, you can most certainly develop AS3 programs for free, and it's popular among people who like creating computer games to embed in web pages. Some of the most successful Flash game developers are said to make many thousands of dollars per month from a single popular game (in advertising revenue). You can also write your own video software if you want to, like YouTube. AS3 lets you develop games very rapidly and to distribute them without having to worry about installers.

C# (C Sharp)


C Sharp is a lot like C++ or Java, except that it's a little easier to use and is largely a Microsoft thing. Most people who use C# use Microsoft's Visual C#; you can develop applications for Windows (only) using a free version of this, however. There's a lot of demand for C# programmers, and it's a very nice language to work with as long as you aren't put off by being slightly at Microsoft's mercy. You can also create web applications using C#. Don't ask me how -- here my knowledge runs out. But it's something to do with ASP. If you want to develop non-game Windows applications very rapidly, C# is a good choice. You can develop games in C# too, but once again you're closely tied to Microsoft's software and technology.

Summary!


That's the lot; of all of these languages, most people will probably want to give Java a go. If you just want to work with websites, probably Javascript/HTML/CSS and possibly PHP are good choices. If you want to develop high-end games or hardware drivers, choose C++ but be aware that it's a steep learning curve (I can help you with that though!); if you want to develop small games as quickly as possible and don't need to get into 3D, Action Script is a great choice. Finally, if you need to process large amounts of data or you want to slosh data about between formats or databases, try Perl or Python.