5 Years of Code::Stats
Five years ago, I was using a web service called Codeivate to track my programming habits. After some on–off, it finally went offline in the spring of 2016. So, during my company’s next hacking event, I started a new project to replace the missing service. That project became Code::Stats. Now, five years later, it’s still running and I’m still focused on improving it. I’m quite proud of what it has become, so here are some updated numbers from the database.
Development
The master branch of the repository has accumulated 600 commits, plus 9 commits in my current unmerged branch. There have been 2,968 changed files, 57,506 insertions and 28,129 deletions in total. There are currently surprisingly few lines in the project, so those changes are relatively small. Here are the statistics from cloc about the codebase:
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Elixir 152 1488 1100 6620
JavaScript 53 1036 267 4251
Sass 34 402 49 1809
EEx 33 358 64 1439
SVG 6 2 3 350
JSON 2 0 0 60
XML 1 0 0 12
-------------------------------------------------------------------------------
SUM: 281 3286 1483 14541
-------------------------------------------------------------------------------
Along the way, I have been helped by many people. Some have written plugins for their favourite editors, others have fixed bugs or implemented features on the site itself. Some have just hung around on our project discussion channels and given me motivation to continue with the project. I’m very grateful for all the help I’ve received during the years. The project is nothing without its community.

In addition, Code::Stats development has been sponsored by my company Vincit Oyj, and AppSignal has provided us with free monitoring tools to help with running the service. Both of these have been invaluable help.
Userbase
There are 12,241 total users in the database. 6,911 (56 %) have written code at least once, so 44 % have only registered and then stopped. There is no CAPTCHA for registration, so probably some of those are bots. 716 profiles are private. Users have sent a total of 91,333,079 API calls.
1,971 users have written code in the last 30 days. That’s 16 % user retention of the total number, or 29 % of those that have written any code. I hope that some will come back to check out the new features that I’m working on. 😉
As shown in the chart below, our users represent 34 different timezone UTC offsets. The overwhelmingly most popular are European/African offsets. DST will obviously muck this data up somewhat.
The next graph shows the most popular hours of day when programming, based on the users’ local times. Quite visibly the most active programming times are at 11 and 15 o’clock. Most users seem to have a break at 12, presumably for lunch. During weekends this break is not present, and programming both starts later and lasts much longer into the evening hours.
In peak hours, there are around 160 API calls per minute, or around 10,000 per hour. The global peak hours are usually between 9 and 14 o’clock UTC, with weekends having a lot less traffic than the week.

Languages
There are 2,108 languages recorded in the system that are not aliased to some other language. Though, many of these will be duplicates of something else, as editors tend to report languages with wildly varying names.
The king of the languages is JavaScript. It alone accounts for 15 % of all accumulated XP. If you would count all the JS family languages, it would be even more overwhelming. The runners up are PHP and TypeScript, so it seems that the LAMP stack is alive and well.
An interesting statistic I saw trend a few years ago was dividing languages into “week” and “weekend” languages depending on their usage patterns. So I processed some assorted languages from the Code::Stats data in the same way. Turns out the three languages most overwhelmginly written during the week are Robot Framework test code and two languages in the Visual Basic family. As we go down the list, we have Elm, Dart, and Julia, which are almost equally written. Surprisingly at the other end, C++ is a weekend language, which could be explained by some very enthusiastic C++ hobbyists.

Editors
The system does not track used editors, but since user agents are stored in the server request logs for a month, some parsing can be done based on that. The most popular editor by far is Visual Studio Code, which reflects my experience. JetBrains IDEs take the second spot, leaving only marginal spots or others. Zsh is not an editor, but it also has a plugin. The two smallest slices are Notepad++ and Emacs respectively.
The Next 5?
So, what’s happening next? I still love working on the project, and it’s my main free time undertaking. In the future I’m dreaming of possibly working on Code::Stats part time, but at this stage it’s still just that, a dream. 🙂
As for features, there’s a lot of requests waiting to be tackled. I’m currently working on a refactoring of the profile page, with some new statistics. In the near future I also want to implement supporter accounts, which will have some mostly inconsequential features, but will be a way to support the project. Of course, with this just being a hobby thing, “near future” may be a very… variable concept. 😅
If you want to be part of the community, please feel free to join one of our discussion channels, I would love to hear your ideas and feedback: