The new hotness index
December 28, 2014
I'm interested in which programming languages people are using, as you may have noticed, and I'm interested in just what might be used as a leading indicator of that use especially. One such guesstimate is presented below.
Ladies & gentlemen I present to you, The New Hotness Index.
The index ranks the languages used to write static site engines. I'm using it as a leading indicator of what's hot in the world of programming languages because people often write a static site engine as an exercise when they're trying out a new language. I know I do.
The table shows the languages used in the last 3 months, ranked by the percentage of each language's total use that this new stuff represents. The percentage the language makes up both of the latest crop & of all the engines all up is also shown. So trends will show up between the usual percentage and the current percentage, and The New Hotness will make itself known when languages experience a sudden increase in use.
Of 339 static site engines with language and creation date recorded:
- Rust - 100.0% of its use is new (& it represents 11.1% of the current crop, but just 0.6% of all engines)
- F# - 50.0% (5.6% of current, 0.6% of all)
- C# - 33.3% (11.1% of current, 1.8% of all)
- Scala - 33.3% (5.6% of current, 0.9% of all)
- Lua - 20.0% (5.6% of current, 1.5% of all)
- Go - 11.8% (11.1% of current, 5.0% of all)
- Shell - 11.1% (5.6% of current, 2.7% of all)
- PHP - 5.9% (11.1% of current, 10.0% of all)
- JavaScript - 4.4% (16.7% of current, 20.1% of all)
- Python - 3.3% (16.7% of current, 26.5% of all)
So Rust shoots to the top of the list, because there are only two static site engines written in Rust & they were both created in the last three months. Rust, The New Hotness.
Likewise, half the F# site engines were created in the last three months, and a third of the C# and Scala ones, and so on. At the other end of this top ten list there are some old warhorses. About a quarter of all the engines written have been written in Python, but only 16.7% of the engines written in the last three months were, and that Python output for the last three months represents just 3.3% of all the Python engines written. JavaScript likewise has been around for a while and is also trending down.
Langauges that are used infrequently will tend to jump to the top of this list, and that's fine, such is the nature of The New Hotness, but some interesting trends emerge from just this one sample, and bear some analysis.
Functional languages are obviously trending. F#, Rust, and Scala are all here. I'd expect Swift to jump to the top of the table when someone writes the first Swift engine. Whether it stays in the list or not I don't know, but its appearance is likely.
Microsoft open sourcing .Net may have had an impact, for C# and F# both.
Go is here, though it's growth is less than its prodigious blog coverage would have implied it's here & it's growing.
JavaScript is falling away. Infighting between Joyent and StrongLoop and high profile defections all haven't helped the Node.js world. CoffeeScript, Dart and the rest are nowhere to be seen though.
Some surprisingly resilient survivors lurch on, zombie-like. PHP, Lua, shell scripts. Perl is going to pop up in this middle ground occasionally when someone gives it a whirl again for whatever reason. That's ok, the trend will I imagine be low & going down.
The two results I found most surprising were for Python and Ruby. I suppose the Ruby figures will always be skewed by the dominance of the Jekyll engine, so the language won't appear in this list all that often. But I hadn't expected Python to be trending down by quite so much. Perhaps a Python static site engine is achieving dominance in the same way Jekyll has, or perhaps as Python's version 2/3 problems drag on Python programmers are moving on, to Go maybe.
I'll do this again at the end of March if I remember and continue to feel the need. I'll set these charts up on their own subpages if I do, when there's more than one.
The script used to throw together these numbers was written in Python. Mostly just as a thought experiment, I'm no Pythonista. For your amusement (mostly) it's up on github as a gist.
Update 15 September 2018: I removed the embedded gist that was here, the link hasn't changed.
Update November 2023: Here it is again, as I leave Github:
"""Relies on data from https://staticsitegenerators.net"""
# from __future__ import division -- python 2 for division using floats
from collections import Counter
import datetime
import json
def run_numbers():
"""Run the numbers on site generator languages"""
with open('static sites 28 12 2014.json', 'r') as file_handle:
data_string = file_handle.read()
data_list = json.loads(data_string)
#can't sort None values in python 3
for eng in data_list:
if eng['created_at'] is None:
eng['created_at'] = '0'
data_list.sort(key=lambda engine: eng['created_at'], reverse=True)
report_time = datetime.datetime.now()
report_time_as_string = report_time.isoformat()
three_months_before_as_string = (report_time - datetime.timedelta(days=90)).isoformat()
three_month_counter = Counter()
total_counter = Counter()
total_new_count = 0
total_count = 0
for eng in data_list:
if (eng['created_at'] is not '0' and
eng['created_at'] < report_time_as_string and
eng['language'] is not None):
total_counter[eng['language'].capitalize()] += 1
total_count += 1
if eng['created_at'] > three_months_before_as_string:
three_month_counter[eng['language'].capitalize()] += 1
total_new_count += 1
print("Of {0} static site engines with a language and creation date".format(total_count))
percentage_list = []
for eng in three_month_counter:
# engine_in_ascii = eng.encode('ascii','ignore') -- would need this code in python 2
# setting up named tuples seems very verbose in python
percentage_list.append((eng,
round(three_month_counter[eng] / total_counter[eng] * 100, 1),
round(three_month_counter[eng] / total_new_count * 100, 1),
round(total_counter[eng] / total_count * 100, 1)))
percentage_list.sort(key=lambda tup: tup[1], reverse=True)
for i, eng in enumerate(percentage_list):
if i < 10:
print("{0}: {1} - {2}% ({3}% of current, {4}% of all)"\
.format(str(i+1), str(eng[0]), str(eng[1]), str(eng[2]), str(eng[3])))
file_handle.closed
run_numbers()