Hacker News new | comments | show | ask | jobs | submit login
Show HN: Code::Stats – Free programming stats service (codestats.net)
36 points by Ndymium 3 months ago | hide | past | web | favorite | 7 comments



Code::Stats is a free service I've been writing (with a few contributors) on my free time for the past couple of years, just had a bigger 2.0 release this July. The backend is written in Elixir with a PostgreSQL database, using the Phoenix Framework. On the frontend is RE:DOM, Chart.js (looking for alternatives), and SCSS.

The point of the service is that it integrates into your editor and sends typing amounts (e.g. "C++ 50 XP") to the service so you can see which languages you have written code in (and you get to level up). The service and all the editor plugins are open source and most of the repos can be found in our GitLab [1].

I'll be happy to answer any questions you might have. :) In general I've had a lot of fun working with Elixir, though I'm far from a pro.

The inspiration for C::S was a service called Codeivate that disappeared at the time I started working on this and never came back. There is also WakaTime[2] which I haven't used myself, but I believe it is more professional oriented (whereas C::S is more "for fun" in my eyes), and it tracks time instead of points, so it's worth checking out as well I think.

[1] https://gitlab.com/code-stats

[2] https://wakatime.com/


> C::S is more "for fun"

This is a very important aspect. It's quite interesting to see how much I've written in each language and compare that to how much functionality I think I've produced which would give me some sense of how effective I am with each.

This perspective also avoids Goodhart's law:

  When a measure becomes a target, it ceases to be a good measure.
It seems to find a point enabling gamification for motivation without motivating gaming in itself.


Interesting... But I have a real problem with something that is recording what I'm doing in my editor or IDE and then sending it via http to an external service... It seems just a step away from being a keylogger.

I'd be more interested in this if it could work as a native application, on my machine, and I could still see and export these insights, without the need of being connected to an external service.


Hey, that's a valid opinion. :) No code is ever sent and I would not even want that, but I understand the concern.

This code base won't convert easily into a native application, but if you don't mind installing some dependencies, you can run your own version on your own computer. All the plugins have the possibility of changing the API URL, so you can point them at localhost or your own instance if you wish. The instructions to do that might not be the best, though, and there's a few different things to install that are required to run it.


If you want to, you could inspect the API and read source code for the plugins that you use (and disable automatically updating plugins if your editor supports that).

Or you could run a local instance. It's all open source and plugins support specifying your own endpoint so you're not tied to the server provided by the author.

Disclosure: I'm the author of two plugins: code-stats-vim and code-stats-zsh.


interesting! I am curious if you considered building this on top of github?


Do you mean getting programming amounts from git repos directly? I consider it too difficult to do sensibly as in commits you may have generated code, copypaste, and also a lot of work may not end up in a commit and so wouldn't show up. That's why I went with an editor plugin, which also has the added benefit that you can see your progress in realtime, regardless of when you commit.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: