Was your new year’s resolution for 2015 to learn to code?
If so, this article is for you , as we look at the best first programming language to learn
There are thousands of programming languages in the world. Hundreds of them are used professionally, and dozens of them have popular followings and huge, active communities that work on them.
If you want to learn programming, which language do you start with?
This blog post describes some popular programming languages, and talks about whether they’re easy or hard to learn.
Easiest to Learn:
JavaScript: JavaScript is the language of the web browser; if you visit a website and it does interactive things, part of the site is probably written in JavaScript.
JavaScript is fairly easy to learn. It has a syntax resembling some of the older and bigger languages (C, C++, Java) but small programs in JavaScript are much simpler than in these other languages. It is unrelated to Java (except for having a similar name).
Since JavaScript is part of every web browser, it is already installed on almost every computer, including yours; if you have a web browser, you can run JavaScript code.
Beginner friendly: Yes! Very!
Ruby: Ruby is a scripting language. It is a sort of spiritual descendent of Perl, but was written to have an easier syntax.
Ruby has become one of the most popular languages for text processing and web programming. It has a powerful web framework called Ruby on Rails which makes website writing much easier.
Ruby comes already installed on Mac and Linux machines, and is easy to install on Windows.
Beginner friendly: Yes
Python: Python is another scripting language. It is also a sort of spiritual descendent of Perl, but is even friendlier than Ruby.
Python is used for many things, including text processing, web programming, science programming, and some high level game programming.
Python code is often described as being unusually close to natural English. The language also has a wide variety of friendly tools for writing almost any kind of program. For these reasons, it is often considered to be among the most beginner friendly languages, and is often taught as the first language at the university level.
Python also comes already installed on Mac and Linux machines, and is easy to install on Windows.
Beginner friendly: Yes! Very!
In fact, the main language style of our Penjee “learn to code” app (which we’ll be releasing by late Feruary 2015) is based on Python style because it’s such a great language for first timers to learn to program.
PHP: Php is a language mostly used for writing websites. It was very popular during the first era of web programming, but has fallen out of popularity, often replaced by Java, Perl, Python, and Ruby.
Php has a friendly syntax, and it is easy to learn the basics. But much of the tutorial material for Php encourages bad programming practices, which makes it harder to learn intermediate programming skills.
Php comes already installed on Mac and Linux machines, and is easy to install on Windows.
Beginner friendly: Yes
Not As Easy:
C/C++: C is a powerful older language. It is very “close to the metal”, which means it closely matches what the computer is really doing, and doesn’t provide a lot of extra structure to help you out. C is used to write operating systems; the core parts of Linux, Windows and Mac OS are all written in C. It is also used to write critical programs for all kinds of other devices, like phones, watches, cars, toasters, robots, and even space shuttles!
C is the second most popular language as of 2014, and one of the most influential languages in history. Many other programming languages used similar language rules as C, so they “look like” C.
One of these is C++, which was written to add powerful object oriented simulation techniques to C. C++ is the third most popular language as of 2014, and is used to write large, high speed applications. It is also the language used to write most games, whether for computers or for consoles like the Xbox, Playstation, and Wii.
There are a number of C and C++ compilers, the most common of which are GCC and Microsoft’s Visual Studio. But C and C++ very hard for beginners to learn. There aren’t many tools provided to the new programmer, and it can be hard to debug programs that aren’t working.
Beginner friendly: No!
Java: Java is the world’s most popular programming language, as of 2014. It is mostly used for writing servers and big business programs. Additionally, almost all Android apps are written in Java.
Java is “C-like”, but it has tools to do just about anything, and it takes care of many small details for you. The code tends to be wordy and overcomplicated, which can be confusing for beginners. It is somewhat difficult to install a copy of Java on your machine, but fairly easy to learn to code once you have it set up.
Because Java is so widely used, it is often the first language taught at the university level.
Beginner friendly: Somewhat
C#: C# is another “C-like” language. C# was developed by Microsoft for Windows programming, and is mostly Windows-specific. C# is used to write all sorts of Windows programs, big and small.
It is very similar to Java, providing many tools out of the box, and it takes care of many small details. Additionally, the Visual Studio program which comes with C# provides lots of programming help, and tools to simplify writing visual applications (with buttons and text boxes and windows, etc).
C# is a sort of successor to Microsoft’s earlier user friendly language, Visual Basic. Visual Basic is easy to learn, but no longer in widespread use.
Beginner friendly: Somewhat
Perl: Perl is a language which is also mostly used for writing websites, as well as small Unix/Linux scripts. For this reason, it is often called a scripting language, though that term doesn’t mean much.
Perl is a very powerful language for processing text.
Perl comes already installed on Mac and Linux machines, and is easy to install on Windows. But the Perl syntax is complex and can be hard to follow. There are lots of small traps for new programmers to fall into. For this reason, new programmers who want the powers of Perl are often encouraged to learn Ruby or Python instead.
Beginner friendly: No
Objective-C: Objective-C is the language of Macs. Most Mac software and almost all iPhone apps are written in Objective-C.
Like C++, Objective-C is an extension of the C language, with an object system to make simulating things easier.
However, like C and C++, Objective-C is a hard language to learn. It comes as part of a larger programming package called XCode, offered by Apple, which is also fairly hard to install.
Objective-C is a very useful language, but should definitely not be the first one you learn.
Beginner friendly: No
Go: Go is a language developed by Google for writing programs intended to run on many machines in parallel.
Go is beginning to gain widespread use in network programming. It is easy to install and relatively easy to learn, but teaches a very different type of programming from most of the other languages, and has fairly specialized uses. Go is a good second language to learn.
Beginner friendly: Somewhat
Scheme/Racket: Scheme is an entirely different kind of programming language which follows a model called functional programming. Functional programming treats programs as a series of mathematical functions instead of a series of commands.
Scheme is easy to install and teaches a very strong set of programming principles; people who learn it first are often stronger programmers as a result. But it can be more difficult conceptually than some of the other languages.
Scheme is widely taught as the first language in university courses.
Beginner friendly: Somewhat
For the best combination of useful and easy to learn, the best first programming languages are probably Python, Ruby, and Javascript.
This site uses Python, because we feel it has the best combination of user friendly tools and user friendly language. Python reads like natural English, so it’s easy to pick up, but also introduces strong programming concepts quickly, and in particular has great tools for web programming, science, games and graphics.