Hacker News new | ask | show | jobs
by CryoLogic 2823 days ago
I have absolutely no doubts that the most used language is JavaScript - considering nearly every website in existence relies on it.

So it's really just a question of methodology. When TIOBE says popularity they must not be talking about usage rates, or if they are perhaps they are specifically sampling some subset of enterprise?

6 comments

> I have absolutely no doubts that the most used language is JavaScript - considering nearly every website in existence relies on it.

You should have doubts because every website you look at is on a device that most likely has tons of parts written in C.

Pretty much any piece of hardware you run your browser on, irrespective of whether you're looking at a website that has javascript code or not, has some C code running to support your javascript VM, browser, and operating system.

Whether you're on a computer, cell phone, gaming console, IoT device, you name it... you're most likely executing some C code quite frequently. And that's whether you're using a browser or not.

C is still the go-to language (no pun intended) for pretty much all drivers (with certain parts in assembly as needed) of any piece of hardware.

Right, but even that comes down to what measure of popularity you're using.

E.g., how many people are writing C, vs how many people are using things written in C.

Absolutely. That's why I reacted to the "most used" criterion.
> I have absolutely no doubts that the most used language is JavaScript - considering nearly every website in existence relies on it.

If you count by total lines of code running in production, then the most likely winner is probably C or COBOL (decent chance your paycheck relies on large COBOL applications working correctly). If you count it by lines of code times number of running instances, then I'm really hard-pressed to pick any other language of C because of its sheer prevalence in things such as cars. If you count by number of programmers, I'm not sure what the winner ends up being.

Even crufty old languages like FORTRAN or COBOL have surprisingly wide usage. Sure, they may be completely absent in user-facing applications, but it's easy to forget that such applications are only a small portion of applications. JS itself would probably end up somewhere in the bottom half of the top 10 in most metrics of "top languages," as it has very little presence outside of user-facing applications.

> If you count by total lines of code running in production, then the most likely winner is probably C or COBOL

By lines of production, it's definitely Javascript. COBOL doesn't come close. What was a lot of developer time in the 80s is dwarfed by the number of people around the world working on websites alone (much less this Node.js silliness).

More Javascript is written every day than is produced in C, all year due to lower barriers to entry, lower cost to fail, easier to debug, less (possible) side effects, and number of developers.

> it has very little presence outside of user-facing applications.

That's where most code ends up getting written. SMH

Your first mistake is assuming that COBOL code was written in the 80s and untouched since then. People are still adding to COBOL code even today, and the language itself is still evolving (the newest COBOL spec was in 2014).

> That's where most code ends up getting written.

That's where most of the easy code to find and count gets written. But there is much more code that's outside of user-facing applications. Operating systems and drivers are relatively small, but have a much higher fraction of utilization since you're always using them. Embedded code is massive--not just the obvious things such as your car or airplanes, but also things like the microcontroller in your disk drive, the bluetooth controller for your headphones, your refrigerator, your microwave. There's the business applications: billing, payroll, corporate intranet, not to mention things such as scheduling the automated builds and tests or the management of releases for all of those applications. It's easy to forget that all of that stuff exists if you never work on it, and it's especially easy to think that it can't be that large.

If you avoid double-counting libraries (which is how I interpret the first number), then applications become a lot smaller because so much of applications is hooking together libraries. This is particularly true of non-app-y JS. By contrast, a lot of the business backend application logic (particularly for things such as payroll) is essentially 100% custom-implemented, so a much smaller fraction of it is common libraries. On pretty much any other metric of code use, though, such applications become far smaller in importance.

Both R and numpy have had some of their internals written in Fortran, iirc, so the amount of Fortran getting executed may actually be going up. The amount of people programming in Fortran is probably not, though.
> I have absolutely no doubts that the most used language is JavaScript - considering nearly every website in existence relies on it.

Just about everything around you that uses electricity is programmed with something other than JavaScript, including everything that runs JavaScript.

It may be true that Javascript is the most used language for "websites", but the percentage of programmers who work on websites is tiny.

Take any big company, go to their jobs site and browse through tech jobs to get a rough sense of what portion involve building websites with Javascript.

As one random example, I just glanced at Bank of America (http://careers.bankofamerica.com/search-jobs.aspx), a $300bn company that employees 200k people, and if I look at "Technology", I see pages of Java/ .Net/ Hadoop roles before I get to the first UI/ website/ frontend one.

TIOBE is, AFAICT, using a single web search engine (Google) and searching for a string representing the language like "C programming" or "Ruby programming", and taking a count of results. This favors languages that have a lot written about them due to age, or student interest, or whatever leads people to write a web page about a language.

It'd be interesting, and no more or less valid, to see how many paper books and ebooks have been sold on each.

GitHub takes count of the projects on its own site in each language, but that microcosm may not represent other places. Anecdotally, my employer runs private git repos on private servers, and our ratios don't match GitHub's.

Another interesting metric would be number of job openings. Another would be average pay for a developer mainly using a particular language. Another would be asking people in a scientific poll which languages they use and which ones they enjoy using.

Depends on what you mean by "most used". Would you include copy&paste duplicates? I doubt that JavaScript remains #1 when you filter these out.