All software is defined by its code, which specifies the instructions or routines that control how it operates. There are many different programming languages in which code is written. Some are general-purpose languages, while others are specialised around particular tasks - such as developing mobile applications, training machine learning models or automating routine processes.
In this article, we explore what the popularity and relationships between different programming languages reveals about modern software engineering. The data comes from a survey of more than 80,000 professional and hobbyist programmers conducted by StackOverflow , an online forum where programmers post questions and answers about code they’re working on.
Web languages top the most frequently used languages
Languages that are used to build websites and other web applications feature prominently among the most popular programming languages. Almost two-thirds of programmers have written code in JavaScript, a language used by nearly all websites to do things like handling user interactions; while more than half of developers have written code in HTML or CSS, which are used to add content or styles to a website respectively.
It’s also noteworthy that two different varieties of JavaScript also feature in the top 10 most popular programming languages: Node.js, a version of JavaScript that’s frequently used to write ‘backend’ programmes such as APIs or interactions with databases; and TypeScript, a language developed by Microsoft that augments JavaScript with features useful when developing large or complex software.
% of coders who've used language in the last twelve monthsThe popularity of different programming languages varies to some extent between countries, perhaps reflecting some differences in educational curriculums or specialisms in the local technology sector.
China, for instance, has a much lower share of developers using web languages among its coders. This is potentially because more of China’s software development is directed towards mobile applications or innovation in technology hardware.
% of coders who've used language in the last twelve monthsSome languages pair well together
The majority of programmers, whether hobbyists or professionals, are users of several programming languages. This is in part because developing software often involves using multiple languages: a web developer will often need to be proficient with at least JavaScript and HTML, and possibly Node.js and SQL too.
Some level of overlap between programming languages is also caused by their sheer popularity: as Python and Java are two popular programming languages, it’s unsurprising that one fifth of developers know both, even if they’re rarely used together.
of developers use both
To understand the relationship between programming languages, regardless of their overall popularity, we calculated the phi coefficient between different languages. This reveals instructive links between programming languages that often map to specific roles or particular areas of specialist expertise.
For instance, Swift is a programming language developed by Apple that’s used to develop apps for iPhones and other Apple devices. It has a strong correlation with Objective-C, an older programming language that Apple developers used to develop apps prior to the introduction of Swift. Swift is also correlated with Kotlin, a language used to develop mobile apps for Android devices.
R, a specialist statistical programming language, is correlated with both Matlab and Python, both of which are often also used for analysing data. Python, however, is a general-purpose programming language with many different applications, so it’s also corelated with more traditional languages for software engineering such as C and C++.
Languages used in web design and development roles are strongly corelated with each other. Developers who know JavaScript will often also work with Node.js, SQL and PHP, all of which are core to the operation of many websites and other web applications.
Association between languagesData and Methodology
The data for this article was sourced from Stackoverflow’s 2021 annual developer survey. We excluded from our analysis all those responses where the respondent had used no programming languages in the last twelve months.
The analysis was conducted using the R programming language. This webpage is built with a combination of JavaScript, HTML / CSS and GLSL.