Which programming language should I start with?

The shallow approach

The easiest way to decide what language to start with is if you know what kind of applications you want to create.

Generally, I advise against this. The reason is: if you're too focused on one area, and you put all your eggs in one basket, then that specific technology or platform disappears, you suddenly become unemployable.

That being said, if you're absolutely excited by one area, then use that enthusiasm to fuel yourself for a few years on top of a language which is good at that area.

What do I mean by “area”? Here is a short list:

  • business applications
  • “AI”
    • machine learning
    • computer vision
    • natural language processing
  • games development
  • mobile development
  • DevOps

See Purpose and Strength of each Language.

The future-proof way

The safer route is to build a robust foundation in generic terms, and then become strong in the areas which excite you. This has the added benefit that it gives you the time to discover what is out there, test the waters in various areas, and decide knowingly what specializations you like.

What you want is to learn a lot of terminology and how things work. Sure, you'll also have to know a language's syntax, but the syntax is not what makes you valuable.

Added benefit: if one area becomes obsolete, you can switch to another branch more easily. Read: job security.

Anyone can learn the syntax of any programming language in 1-2 weeks, but not anyone can switch from DevOps to machine learning, and then again to mobile development.

Currently, I recommend a combination of two languages, with a third optional one, to build a robust foundation:

  • C
  • Python
  • JavaScript*

The rationale is this:

With C, you can learn how the machine works. C is a language with a small amount of concepts. On top of that, the concepts you can learn with C are reusable in all other imperative or object-oriented languages.

What I suggest to learn with C:

  • data and execution flow (if, for, while, do-while)
  • data structures (enum, struct, union)
  • arrays
  • functions
  • pointers (address-of operator (&), pointers to values (*), pointers to pointers (**), pointers of level three (***), pointers to functions)
  • difference between arrays and pointers
  • how to create a type-less data structure with enums, structs and unions
  • how to simulate OOP with structures and pointers to functions
  • isomorphic data structures: linked lists, trees, graphs (how to create, iterate – recursion, extend, free)

Python on the other side, allows you to experiment with a lot of “supporting technologies” which you'll likely have to use at some point in your career:

  • file formats like: XML (and related: XSL, XSL-T, etc), INI, YAML, JSON
  • multi-threading
  • network programming
    • how to create a server (tcp, udp, w/o multithreading)
    • how to create a client
  • computer vision (with the help of OpenCV)
  • numerical methods
    • with the plethora of mathematics software like sage-maths
    • with libraries like numpy, scipy
  • how to make simple 2D games with libraries like pygame

You can also use Python to learn web programming. For this, there are some prerequisites:

  • html – the markup language in which documents on the web are written
  • css – the language used to style documents (adding colors, sizes, etc)
  • Javascript – optional for making a site, but required if you want to learn about AJAX and DOM

Steps and things I suggest you experiment with:

  • html, hard requirement
  • learn how to create a simple site and serve it with a server written in python; you can use a simple framework like flask
  • learn how to reuse parts of html documents by using a templating language like jinja2
    • example task: create a navigation sidebar which appears on all pages of your site
  • optional: learn how to style your site with CSS
  • about the DOM model and how to manipulate/animate elements on the page with javascript
  • how to render forms with HTML and process them in the backend with Python
  • send asynchronous requests to the python backend with ajax