A Beginner's Guide to Programming Languages
How To Choose Which Programming Language to Learn
Since you have chosen to visit a page about programming languages I am going to assume that you already know about the many benefits of learning to code. So, you have already decided that you are interested in the possibility of learning to become a programmer, but you just don't know where to start.
There are literally hundreds of different computer programming languages out there, and it can be quite difficult to pick the one(s) that will be most useful to you if you are a complete beginner and still know very little about each one.
To help you decide which programming language(s) to learn this article will guide you through the different types and explain the process of choosing the right language to meet your goals. It will also include an introduction to many of the most popular languages in use today.
Have a Clear Vision of What You Want to Achieve
If you want to make sure that you pick the right learning path to help you achieve all of your goals then it is obviously important to be as clear as possible in your mind what those goals are. Even if you are a complete beginner and just want to learn to code because you think it may help your career or because you have heard it is a rewarding thing to do, it is still worth thinking about the kind of project you are likely to be interested in getting involved with so that you can learn the right skills.
If you want to make apps then you will take a different path to someone who wants to develop websites, which again is different to someone who would like to develop desktop software, which is different again to industrial software, and so on.
Common Goals for Beginners with Suggested Learning Paths
Making Your Own Apps
Becoming a Freelancer
High Flying Career
It's a good idea to take the time to learn the basic principles of computer science before you do anything else
Choose which platform you want to program for first and choose a language accordingly
Python is a popular choice as a starter language for academics
Learning the ins and outs of CMS like Wordpress is a very good idea if you want work as a freelance programmer
C, C++, Visual Basic, or Java
Most People Start With...
- HTML, or HyperText Markup Language is the place where most people start. It is used to give structure to most webpages and you can learn to create a basic page in just a few hours!
- CSS is often learnt together with HTML, and is used on most websites to define layout and styling
Client-Side and Server-Side Languages
'Client Side' and 'Server Side' may sound like difficult technical terms to some, but they just refers to the location where data is processed.
Server side means that the code is actually run on the server hosting the web site or application, and only the result of running the code is subsequently sent to the user's device. This is an essential requirement for larger applications or functions which need to access information stored in a database, for example. By far the most popular server side language for creating web sites is PHP, which often works together with SQL or mySQL databases.
High and Low Level Languages
Most code written to create software and applications for the general public to use is written in a high level language. This just means that it is closer to the machine's user than to the machine. A low level language is much closer to the actual binary machine code of 1's and 0's which runs on the hardware itself.
Most programming languages are software products, which themselves are written in other languages! Higher level code is usually translated into lower level code, perhaps multiple times, in order to be actually run on the machine.
Object-Oriented Programming Languages
Object-oriented programming (OOP) is the most common 'paradigm' that most software and web developers will work within. Many coders will spend the whole of their career working primarily with OOP and will never need to learn another 'paradigm' in any significant depth.
OOP is a very powerful type of language based on the creation of 'objects' which can be associated with both data fields (lists, variables) and methods (functions). Because it is so effective and so popular it is highly likely that you will start your programming career with OOP.
Some languages are entirely object-oriented (OO), meaning that they treat everything as an object, even down to individual characters; these are called pure OO. But most code you will come across just uses objects as part of the way that they operate
Are you learning to code for the first time?
10 of the Most Popular Programming Languages
- HTML/CSS: Many people don't consider these to be programming languages, and strictly speaking they are probably right, but this is where most people start and this page is written mainly for beginners so I have included them here in first place. If you want to create a basic static web page then you can do that with HTML/CSS, which is very easy to learn.
- PHP: This is the most popular server-side language and is used mainly for developing dynamic web pages. This means that rather than creating a separate file full of code for every page of a site, you can write a set of rules for accessing and displaying information from a database which can then create pages as and when they are needed.
- C++.: Developed to add object-oriented features to the C language,with the addition of classes and other features. C++ is now widely used with a substantial range of applications. Learning C++ also has the advantage of making it easier to pick up both C# and Objective C. All C languages are generally seen as mid-level.
- C#: Pronounced C Sharp, this language was created by Microsoft within its .NET framework. If you want to write windows applications, or especially if you want to write code for desktop software, this is essential. It is a general purpose OOP which shares many similarities with the older C language on which it is based, as well as others based on C such as C++.
- Objective C: This is the version of C used by Apple operating systems as well as a small number of other applications. If you want to specialise in writing code for Apple products then this is what you will need to learn.
- Python: This is a popular high level interpreted language (see below for what interpreted means). It is very popular within the academic and scientific community, but has also been used to create popular websites such as Pinterest. It is relatively easy to learn compared to something like C or its derivatives, but is still very flexible in terms of what you can do with it.
- Java: Used by Google as an integral part of the Android operating system, and by independent developers to create android apps (as well as other uses). Java was created with a "write once, run anywhere" (WORA) approach to make it easier for code written on one machine to run on another.
- Ruby: This is a popular pure OOP from Japan. People often approach Ruby first through 'Ruby on Rails', an open source application framework for creating apps written in Ruby which is very popular.
- Visual Basic: Derived from 'BASIC', which was very popular in the early days of personal computing, Visual Basic (VB) allows for simple programs to be created quickly and easily, whilst also allowing for more complex coding. It was created by Microsoft but older versions are no longer supported and the newest version may not be supported after Windows 8.
Interpreted and Compiled Languages
A compiled language will take the code that you write and turn it into the 1's and 0's of machine readable binary code. When the software is then used, it is this machine code which is actually run. An interpreted language executes the code you write step by step by translating it into machine code as it goes, without needing to 'compile' the code in advance.
In general, compiled languages have improved performance whereas code written in interpreted languages is easier to deploy and modify.
In principle any language can be either interpreted or compiled, as this relates to the method through which the code is executed rather than the syntax and structure of the code itself. In practice, however, many languages are exclusively interpreted or exclusively compiled - although some can be used in either way.
Common Interpreted languages include PHP and Python, whereas the C languages are almost always compiled.
Imperative and Declarative Programming
Imperative programming languages specify each step that the computer must take to complete a task, whereas declarative languages tell the computer what it should accomplish but leave some freedom as to which steps to take.
At the lowest level all of the instructions run by a computer are communicated to it as imperative commands, but higher level languages may be thought of as being placed on a continuum between Imperative and Declarative.
Many popular higher level languages are procedural. This means that methods or functions can be called, some of which may be already built into the language, to perform certain actions. In some ways this moves the experience of writing code from away from a purely Imperative paradigm and closer to Declarative, as the desired function may be called without the person who is calling it having to specify all of the steps that the machine should perform to complete that function themselves. The imperative commands are, however, still there under the surface.
A functional language does not have mutable data structures which can change their state throughout the code. They are made up from self-contained functions which depend only on their own inputs. They cannot modify the values in lists, variables and so on, meaning that each function will always have the same result no matter what the rest of the code is doing.
Because functional code relies on mathematical principles it doesn't need to specify the individual steps which the computer must take, and so is classed as a Declarative language.
This kind of code is mainly used in commercial and industrial applications or for academic purposes, rather than in consumer products. Popular functional languages include F# and Haskell.
Any logic based programming language will be declarative.
This kind of language is intended purely for storing, searching and manipulating data, often in the form of database tables.
The most popular example of this is SQL, which is used by many websites to create, maintain, optimize and access information from databases stored on servers. Most websites, especially large ones, will store all of their text, as well as images, videos and even structural elements such as categories and tags within databases.
Because it works with data and logical structure, SQL is classed as a declarative language.
Assembly languages are the lowest level of code before you reach machine code itself. They are used to translate the machine code into a form which can be read by humans, and to transmit direct commands to make changes to the state of the machine code.
Very few programmers will ever need to work with assembly during their careers, but a basic understanding of how it works can be very helpful in gaining a more in-depth understanding of what is happening when higher level code is actually run on a machine. It can also be useful if you want to work within embedded electronics, in some areas of hardware development, or in the development of other programming languages.