Which programming languages should you learn?

Learning a new programming language is a great way to get ahead in your career. But which one?
247 readers like this
247 readers like this
magnifying glass on computer screen

Opensource.com

If you want to get started or get ahead in your programming career, learning a new language is a smart idea. But the huge number of languages in active use invites the question: Which programming language is the best one to know? To answer that, let's start with a simplifying question: What sort of programming do you want to do?

If you want to do web programming on the client side, then the specialized languages HTML, CSS, and JavaScript—in one of its seemingly infinite dialects—are de rigueur.

If you want to do web programming on the server side, the options include all of the familiar general-purpose languages: C++, Golang, Java, C#, Node.js, Perl, Python, Ruby, and so on. As a matter of course, server-side programs interact with datastores, such as relational and other databases, which means query languages such as SQL may come into play.

If you're writing native apps for mobile devices, knowing the target platform is important. For Apple devices, Swift has supplanted Objective C as the language of choice. For Android devices, Java (with dedicated libraries and toolsets) remains the dominant language. There are special languages such as Xamarin, used with C#, that can generate platform-specific code for Apple, Android, and Windows devices.

What about general-purpose languages? There are various choices within the usual pigeonholes. Among the dynamic or scripting languages (e.g., Perl, Python, and Ruby), there are newer offerings such as Node.js. Java and C#, which are more alike than their fans like to admit, remain the dominant statically compiled languages targeted at a virtual machine (the JVM and CLR, respectively). Among languages that compile into native executables, C++ is still in the mix, along with later arrivals such as Golang and Rust. General-purpose functional languages abound (e.g., Clojure, Haskell, Erlang, F#, Lisp, and Scala), often with passionately devoted communities. It's worth noting that object-oriented languages such as Java and C# have added functional constructs (in particular, lambdas), and the dynamic languages have had functional constructs from the start.

Let me end with a pitch for C, which is a small, elegant, and extensible language not to be confused with C++. Modern operating systems are written mostly in C, with the rest in assembly language. The standard libraries on any platform are likewise mostly in C. For example, any program that issues the Hello, world! greeting does so through a call to the C library function named write.

C serves as a portable assembly language, exposing details about the underlying system that other high-level languages deliberately hide. To understand C is thus to gain a better grasp of how programs contend for the shared system resources (processors, memory, and I/O devices) required for execution. C is at once high-level and close-to-the-metal, so unrivaled in performance—except, of course, for assembly language. Finally, C is the lingua franca among programming languages, and almost every general-purpose language supports C calls in one form or another.

For a modern introduction to C, consider my book C Programming: Introducing Portable Assembler. No matter how you go about it, learn C and you'll learn a lot more than just another programming language.

What programming languages do you think are important to know? Do you agree or disagree with these recommendations? Let us know in the comments!

I'm an academic in computer science (College of Computing and Digital Media, DePaul University) with wide experience in software development, mostly in production planning and scheduling (steel industry) and product configuration (truck and bus manufacturing). Details on books and other publications are available at Marty Kalin's hompage

21 Comments

Strange that you didn’t even mention PHP, which is the most used for web dev on the server side...

Me too I wonder how PHP was completely forgotten in this nice article.

In reply to by Bernard (not verified)

Wow, not even a mention of PHP in the web languages. Even though it is by far the most widely used for that. So much PHP hate out there. You know what they call a PHP developer don't you? "Employed"

It's not hate!
The subject is: what are the programming language you SHOULD learn.
Well PHP is old and lots of better alternative are out there now. So, yes, you should learn them instead of PHP if you want, at least, be an employee...

In reply to by Patrick Thurmond (not verified)

PHP is a terrible language to learn as your first language. It will teach you how to be angry at the tools you're using.

Also on your other comment, people employ lots of other languages and the industry is moving away from PHP.

For more details on why you should NOT learn PHP:
https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

In reply to by Patrick Thurmond (not verified)

If you want to develope android mobile apps kotlin is a must have language and you can even write backends/web frontends and native desktop applications with it :)

Missing Kotlin for Android development, I believe Kotlin now is the default choice for it.

What about Dart with Flutter having so much momentum?

Good calls--PHP should have been cited. It's very hard, however, to determine which server-side language dominates.

Its strange that you didn't talk about php on the web more than 50% using php.

I decided to learn to program in 1997, or so, when it became clear the internet was going to be a "thing". I read 'Beginning C' by Ivor Horton. Did not grasp much the first read, so read it a second time. I went on to master Perl, Php, Bash and system administration. However, you've inspired me to pick up C again.... thanks.

I prefer languages which focus on simplicity rather than complexity. Languages like C and Go are my choices and their simplicity make them ideal for open source projects.

I would like to get programming skills from since am a mathematics and computer science student

Is it posible to write this lines without having PHP on your mind? I don't think so...

It seems like you just hate it! ?

I find C a very hard nut to crack as a starting programming language. I don't know how many books I have on C or C++, and it's very hard to get very far with either. I think Perl or Python are much better for starting out. There are a lot of similarities in structure between Perl and PHP.
I think the starting point should be coming up with some idea of what you might want to do with this or that language. Sift around for some short programs that do something interesting and that you might actually use, then pick away at making changes in the program to customize its output or maybe just see what happens when you change one or several lines.

Also many other language use C for model, can help others like shading languages like Open Shader Language and GLSL. Almost every CPU have C compiler. Many science simulations still use Fortran, also very fast.

1. Ruby|Python|Perl|Forth(Postcript)
2. C|Assembler|C++|Pascal
3. Haskell|Scala|Prolog

For me programming is not so much about learning the specific syntax of a language, that stuff can be Googled. What's more important is to understand the logic of programming and then be able to break the task into definable chunks that can be programmed in order to solve a problem. It's also important to select the correct language to use for the specific problem you have to solve. Also, learn Python, it's fun!

I think so that"learn C and you'll learn a lot more than just another programming language."

PHP is not mentioned that's a surprise. The opensource.com itself is made in PHP - Drupal

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.