5 First Programming Languages You Should Learn

So you want to learn programming, but aren’t sure which programming language you should learn first? In this article, I’ll try and help you pick a language. There are certainly plenty to choose from.

Back before the web came along, that decision over languages was much easier to make. There was no web or mobile development, so the choices were pretty much C, BASIC, Pascal, or C++ (and maybe Fortran or Cobol for legacy systems).

These days, on the other hand, you are faced with a dazzling selection to choose from. There are the legacy desktop languages: Delphi (which is Pascal), C++, and, believe it or not, Fortran and Cobol (still around, yes!). For desktop languages, you now have C# and VB.NET on Windows; on Linux/Mac, there’s C, C++, and Python. You can run C# applications on Linux, and Python runs on all platforms (though I find it best on Linux).

For mobile development, you have the native languages: Swift and Objective-C for iOS, and Java or Kotlin for Android. For cross-platform mobile development, you have C# with Xamarin, JavaScript with various frameworks, and newcomer Dart (with Flutter). JavaScript can also be used with various frameworks for hybrid development; it looks like a native application and can leverage features such as GPS.

For web development, you have PHP and C#/ASP.NET, Ruby, Python and Java. That’s the backend; for the front end, there really is only JavaScript, though there are several alternatives that produce JavaScript as an output (these include Microsoft’s Typescript and Dart). If you go down the web route, you will have to learn HTML and CSS; HTML is pretty easy but mastering CSS takes a bit more effort.

So let’s narrow this down to five languages that you can choose from, and why I’ve picked these five:

  • Python
  • JavaScript
  • C#
  • Swift
  • Java


In my opinion, Python is the easiest to learn of the five languages listed here. You don’t have to worry about types, and there are no curly braces needed for identifying blocks—instead, you just indent by four after a colon. It’s a very well-designed language, but also very powerful.

There’s the older Python 2 and the newer Python 3. You can learn either (or both), but Python 3 is the future and the recommended version. Here’s a code sample below; it’s a function that recursively calculates and prints the first Fibonacci numbers:

def rec_fib(n):
    if n > 1:
        return rec_fib(n-1) + rec_fib(n-2)
    return n
for i in range(10):
    print i, rec_fib(i)	


In terms of actual programming jobs, Python isn’t that common as a primary language—but it’s one that’s valuable to know, as it does pop up with fair frequency.


The only language on this list that runs in a browser, JavaScript is easy to get started with—after all, everyone has a browser on their PC. It’s also a powerful language.

Once you’ve learnt the language, you’ll have to learn the ecosystem. There are frameworks and libraries galore. Do you go down the path of Angular or Ember, or maybe React? Perhaps you just want to stick with jQuery. It’s a very deep rabbit hole!

JavaScript has been slowly evolving from ECMAScript 5 to ECMAScript 6, with most browsers compatible with the latter. You can check browser compatibility on Kangax.

Just for comparison with Python, here’s a recursive Fibonacci program in JavaScript:

function fibonacci(n) {
   return n < 1 ? 0
        : n <= 2 ? 1
        : fibonacci(n - 1) + fibonacci(n - 2);



An alternative method for using JavaScript: Node.js, a JavaScript runtime. You shouldn’t learn it immediately, but if you are considering a career in developing websites, it’s a technology to seriously consider adding to your portfolio.


If you want a language that can be used to create desktop applications, mobile cross-platform applications, and websites, then C# should be your choice. It’s also pretty easy to get into; the Visual Studio 2017 Community version is free, and includes C# for desktop Windows development, ASP.NET for websites, and Xamarin technologies for mobile.

C# and Java (see below) are very similar, though the similarity has faded a bit in recent years as C# diverged from Java. If you learn ASP.NET MVC for doing the backend of websites, you’ll find plenty of jobs.

C# is now up to version 7.2; the version I suggest you learn is C# 6.0 or higher for one reason alone: interpolated strings, which reduce the amount you have to write by quite a bit.

Here’s a recursive Fibonacci program in C#:

static void Main(string[] args)
    int number = 10;

static void fibonacci(int n, int a = 0, int b = 1)
    if (n == 0) return;
    fibonacci(--n, b, b+a);


If you have an interest in developing for iOS—and you probably should, considering the revenue that iOS app developers can potentially earn—then Swift should be near the top of your programming-languages-to-learn list.

Version four of Swift was released in September 2017, with improvements in string handling, collections, stability and more. Although designed to replace Objective-C as the primary language for iOS development, Swift has increased its scope to include system and desktop programming (it’s also been open-source for quite some time). Swift can also be used in apps for macOS and watchOS, making it essential if you’re interested in Apple’s broader ecosystem.

Here is a Swift recursive Fibonacci implementation:

func fibonacciRecursiveNum1(num1: Int, num2: Int, steps: Int) {

    if steps > 0 {
        let newNum = num1 + num2
        fibonacciRecursiveNum1(num2, num2: newNum, steps: steps-1)
    else {
        print("result = \(num2)")
fibonacciRecursiveNum1(0, num2: 1, steps: 10)


Java is now 22 years old and firmly established, although poor security features have led to a decline in desktop-related usage. Compensating for that dip, however, has been an accompanying rise in mobile development, thanks to Java’s use in Android.

Here is the recursive Fibonacci function in Java:

public class MainClass {

  public static long fibonacci(long number) {
    if ((number == 0) || (number == 1)) 
      return number;
      return fibonacci(number - 1) + fibonacci(number - 2);

  public static void main(String[] args) {
    for (int counter = 0; counter <= 10; counter++)
      System.out.printf("Fibonacci of %d is: %d\n", counter, fibonacci(counter));


I’ve excluded functional languages such as Lisp, Scheme, Haskell and F# as first languages; for people who aren’t specialists (and many entry-level tech pros aren’t specialists quite yet), they’re not suitable.

I came close to including PHP, which is only used for website development, and it’s definitely worth a mention. The easiest and cheapest way to get a website live is to host on a Linux platform with shared hosting using PHP. For instance, WordPress, Drupal and Joomla are all programmed in PHP. If building websites interests you, learn how to use PHP for the backend, in addition to JavaScript for the front end.


2 Responses to “5 First Programming Languages You Should Learn”

  1. Real Programmer

    Same languages over and over again… If you want to learn to be an actual programmer, then learn some languages that are actually different from one another. Yes, Python and JavaScript are useful but they also can be dangerous for new programmers because they are not very opinionated. If you really want to learn how to program then start with Dart. From there learn any Lisp language (Clojure, Scheme or Common Lisp) and then learn Ocaml, Haskell, or Scala. After you’ve got a solid foundation in these languages, go check out something low level like Rust, C++, Go etc and then check out Erlang or Elixir. Once you’ve finished with these 5 languages, you will be able to learn any other language with ease and you won’t be a trash tier programmer. You won’t have picked up the trash bad habits that come with learning JavaScript first.

  2. Edgar Sánchez

    Last year I thaught F# to a couple of *first* semester interns, in a few weeks they learned to make graphics, access databases, create REST services, extract data from HTML tables, and such. “FP is only for specialists” is mostly a myth nowadays.