X
Business

Which programming languages are most popular (and what does that even mean)?

Popularity may not be a single vector answer, but students and professionals still want to know if they're guiding their careers and companies in the right direction.
Written by David Gewirtz, Senior Contributing Editor

My UC Berkeley programming students often ask me which programming language is the most popular. It's a simple question with a far-from-simple answer.

Let's start with why people want to know. Usually, at least when it comes to students, they ask which language is the most popular because they want to learn subjects where there are jobs. For most people, it makes very little sense to enter a field with knowledge about something that's not in demand.

Other times, programmers who are already skilled want to get a feel for whether their current skills are relevant, or whether it's time to look at other languages because shifts in popularity might mean it's time to bone up on a new language.

Developers who are building products also want to know about popular languages, because if they're building APIs or other compatibility options, they want to make sure they're producing solutions customers will use. It's very important to support the most popular environments.

Finally, if you're starting a project, you need to choose what language to build in. Your first criterion should always be to use a language that can get the job done. If one language is hugely popular but would take two years to code, and another is less popular but would take two months for your application, you clearly should choose the less popular language. But, all things being equal, choosing a more popular language generally means access to more programmers and resources, so that's an important consideration as well.

What defines popular?

So which language is most popular? That, my young Padawan, is not as easy to answer as you might think. The key is to determine what defines popular.

This is such an open question that there's a Wikipedia article devoted to measuring programming language popularity. The article shows a number of possible factors for measuring popularity, including:

  • The number of times the language name is mentioned in web searches, such as indicated by Google Trends
  • The number of job advertisements that mention the language
  • The number of books sold that teach or describe the language
  • Estimates of the number of existing lines of code written in the language, which may underestimate languages not often found in public searches
  • The number of projects in that language on SourceForge, Freecode, and GitHub
  • The number of postings in forums and newsgroups about the language

Even that's not complete. You could add some of these metrics to that list:

  • The number of courses sold by programming bootcamps
  • The number of students enrolled in programming classes around the world
  • The number of videos on each language on YouTube
  • The number of postings on Reddit or Stack Exchange about a language

You get the idea. This can get even more complicated if you factor in popularity across nations. Are certain languages more popular in India? In the United States? In Russia?

The bottom line is that popularity is not a single vector answer.

Different measurement sources

Therein lies the rub. Even with an understanding that popularity can be measured based on so many different factors, students and professionals still want to know if they're guiding their careers and companies in the right direction.

There are a number of online sites that publish language popularity metrics, each according to different criteria. IEEE Spectrum takes an interesting approach, because it has an interactive chart that allows you to weight different factors, like job site listings or open source hub projects.

ieee-spectrum.jpg

Source: IEEE Spectrum

Coding Dojo has a chart where it aggregates stats from job search engine Indeed.com. Tiobe has long used search engine aggregates to calculate popularity. PyPl looks at the popularity of language tutorials on Google.

Unfortunately, that doesn't really help. If you're looking at what languages to learn, or what languages you need to support, it's hard to decide which chart is the one to bet on.

Okay, I get it. So what's the most popular language?

To help give you some guidance, I combined the various sources mentioned above. For the three IEEE categories, trending means the languages that seem to be growing, jobs reflect job offerings at Dice.com and CareerBuilder, and open reflects the number of open source projects.

The result was the rankings in the following chart:

combined-chart-a.jpg

Combined chart of language popularity metrics.

But the problem is, that really doesn't tell you where to focus. To get to the heart of the matter, I did some data analysis. I aggregated the data from five of the six sources (I left out Coding Dojo because it only showed ten languages). Then I weighted each language based on where it appeared on each chart and how many times it appeared. I took the top ten results and generated the chart the following language cluster aggregation chart.

language-cluster-aggregation-a.jpg

Weighted aggregate analysis by David Gewirtz based on IEEE, Coding Dojo, PyPl, and Tiobe.

As you can see, there are three clusters of languages. The top cluster contains Java, C, Python, and C++. Without a doubt, you should attain familiarity with these four languages. The next cluster contains JavaScript, C#, PHP, and Swift. The two remaining languages are Objective-C and R.

So what does this really tell us?

The languages in the first cluster, Java, C, Python, and C++, are pretty much universal languages. They're not tied to a specific programming platform or focus.

The most interesting clue is the second cluster, containing JavaScript, C#, PHP, and Swift. JavaScript and PHP are mainly web development languages. C# is a Microsoft-centric language. Swift is Apple's new main coding language. Fundamentally, the second cluster is platform-specific.

Again, what does this tell us? If you know about modern coding, you realize you're not just using a language. You're always developing for something, whether that's an embedded system, an iPhone, a web application, or a Microsoft server application.

Language familiarity is only a piece of the puzzle. For example, no matter how much you like Python or the very-ancient-but-still-ticking C, if you're programming WordPress plugins or themes, you're writing in JavaScript and PHP. It doesn't matter how popular the other languages are. If your employer is a Microsoft developer, you better know C#.

Reading between the lines

There are a few more interesting things I'd like to make sure you note. First, Coding Dojo's top language was SQL. That makes sense, except it doesn't. You very rarely only code in SQL. You use SQL to access data, but you manage those data queries in another language. So it's good (necessary, even) to know SQL. However, just taking a SQL course won't guarantee you a job, good money, or a life on Easy Street.

Second, the Apple-specific languages are lower on the charts than you might initially expect, given the popularity of iOS apps. But it makes sense. If you want to go off and build your own app, you want to learn those languages. But there aren't a huge number of companies hiring Apple app developers, at least primarily. That's why Swift is relatively far down the chart. Objective-C is being replaced by Swift, and we can see it dropping right before our eyes.

The C-family of languages still dominates. Java, C++, C, C#, and even Objective-C are all C-based languages. If you're only going to learn one language, you should pick one of those. I'd recommend Java or C++, since those will open you to the rest of the C-family.

At this point in my career, I can program, off the top of my head, in something like 20 languages. I can generally pick up a new language in a matter of days. That's because my engineering school thesis was in language design, and I've been teaching programming on and off for 20 years. Being multilingual has helped me, because I almost always choose a language for the job I'm doing, not because I only took one course and that's all I know. This may sound intimidating, but you can do it, too.

My advice to you, especially if you want to move into programming, is to learn multiple languages and multiple frameworks. Build things in the languages. Programming is not just an intellectual exercise. You have to actually make stuff.

Being comfortable in multiple languages and frameworks is important, because the computer industry is changing so much. Sure, C has been around longer than digital watches and Pong, but Swift is only a few years old and is already in the top ten. What you learn today is probably not going to be enough for your entire career. So learning how to learn languages is as important as learning a language -- and the best way to do that is to learn more than one.

My recommendation is pretty simple. Pick either C++ or Java and learn it. Then learn JavaScript. More and more web-based applications require good JavaScript skills. Then pick either PHP, Swift, or Python, depending on the kind of work you want to do. Once you know one of each of those three sets well, you'll be able to pick up whatever additional language or framework you'll need with relative ease.

Go ahead. Learn some languages. Build great stuff. Tell us about it in the TalkBacks below.

You can follow my day-to-day project updates on social media. Be sure to follow me on Twitter at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, and on YouTube at YouTube.com/DavidGewirtzTV.

Editorial standards