A professional sportive tries to monitor precisely his daily training process, including his food, which muscle she/he is working on etc.
Well, similarly, developers and programmers might be interested to know on which projects they spend more time, on which files or directories they work on etc.
Hum… in fact, the real reason seems to be pure ego: programmers are proud to see how much time they can work on each of their projects.
Avertissement
If you are concerned about your privacy, you should rather use a local-only tool such as the great ActivityWatch, which offers a « watcher » plugin to monitor your editing activity for a few editors, including VSCode that I use and advise to use! Your data remains local and no espionage is possible with ActivityWatch.
À faire
Try both all the month of April, then remove Wakatime if I’m happy with ActivityWatch?
With this in mind, let me present an interesting and peculiar tool that I have been using from a while.
The goal of WakaTime is to offer to any developer an easy, (relatively) « secured » and centralized way to monitor the time she/he spend on programming, on a daily, weekly or monthly basis.
And they do the job extremely well, because WakaTime offers three things:
The concept is quite simple after: your text editor is spying on you and each aspect of your programming activity, to send the data on-line on WakaTime servers, and then you (and their sys-admins, and the NSA of course) can easily read and use your personal data.
Scary, right?
I was using Sublime Text 3 almost exclusively for about 4 years.
Without any surprise, the WakaTime team had written a plug-in for Sublime Text 3.
You can install it with two clicks, and the plug-in will integrate nicely in ST3 (discrete, minimal system workload, and it can even stores the data in order to send them later if your computer is temporarily disconnected from Internet).
During the first 8 days (after installing it, in January 2015), I was in a coding marathon to conclude some projects (StrapDown.js, my MEC Students Face-Book demo etc), but still, I was kind of scared to see that I used my text editor for 29 hours in 8 days!
It is also possible to see:
on which project do you spend the most of your time,
which file-types are the more used, on a daily basis,
and even on which files have you worked one (this last thing can be disabled).
For instance, during my first week of use, the repartition was about: 30% HTML, 29% Python, 15% reStructuredText, 6% Bash, 12% Markdown.
WakaTime thinks I only use (and it’s almost correct!):
WakaTime detect that I am using the wonderful Visual Studio Code for about ~90% of my daily writing/coding/programing, and Sublime Text
and PyCharm IDE for the remaining ~10% :
I would love to find an easy way to just include the pie chart, and not the entire page.Edit: On December 19th (2015), I got a personal email from Alan Hamlet, CEO and founder of WakaTime, to inform me of the new charts share feature.
The charts displayed above are good examples of what brings this very new WakaTime feature (I find it very cool!).
Like in 2015, about 600 hours in 2017 entirely (611h), average for WakaTime users was 249h (and max 3468h !).
Daily average about 2 hours 17 minutes in 2017, average for WakaTime users was 41 min (but the max was 9 h 30 min, this programmer is most surely a crazy dude!).
I coded entirely under GNU/Linux (I am a big fan of XUbuntu, as always), and about 303h with Sublime Text, 282h with Visual Studio Code and 45h with PyCharm. GNU Nano, Firefox and Jupyter are not counted (but uLogMe tells me I don’t spend much time in them anyway).
A little less than in 2017 I coded about 600 hours in total in 2018 (587h), while the average number for WakaTime users was 320h (it has increased since the first years!).
A very stable daily average, at 2 hours 18 minutes in 2018, while the average for WakaTime users was 52 minutes (also increased!).
My most intense day was October 10, 2018, with 10h 50 minutes. I think it was to finish these two articles, HAL-02049824 and HAL-02006825!
I coded 100% under GNU/Linux (I’m a XUbuntu fan as always), and 100% with Visual Studio Code. GNU Nano, Firefox and Jupyter are not counted (but uLogMe tells me that I spend less time there anyway, although I used Jupyter much more in 2018, with these two projects ParcourSup.py and notebooks).
Some projects have also kept me very busy: fontify with 21h in March 2018, ParcourSup.py with 28h in June and July 2018 (not counting the time in Jupyter), the treasure hunt for my 25 years with 6h in February 2018, etc
A lot less than in 2018 I coded about 500 hours in total in 2019 (508h), while the average number for WakaTime users was 289h.
A very stable daily average, at 2 hours 15 minutes in 2019, while the average for WakaTime users was 47 minutes.
My most intense day was January 28, 2019, with 8h 58 minutes. I think it was to finish this article, HAL-02006471!
I coded 100% under GNU/Linux (I’m a XUbuntu fan as always), and 100% with Visual Studio Code. GNU Nano, Firefox and Jupyter are not counted (but uLogMe tells me that I spend less time there anyway, although I used Jupyter much more in 2019, with these two projects ALGO1-Info1-2019 and notebooks).
Way less than in 2019, I coded about 128 hours in 2020, when the average of all WakaTime users was 313h (increasing).
I can explain this drop of coding time by a few reasons a) I almost did not write any research articles this year, and I did not have to write my PhD thesis (i spent so much time on it in 2019!) b) I am no longer in active development of any personal programming project (as I was in the last two years with SMPyBandits, c) I almost did not have to write any slides or notebooks, d) most of my teaching material was already finished or almost ready, e) I still code, but often I just use GNU Nano in a terminal for quick and small edits, or Python in a Jupyter notebook (and this isn’t accounted for by WakaTime), f) for one course (INF1, introduction to programming using Java, at L1 level at University Rennes 1), I had to use Eclipse and didn’t think about installing the WakaTime plug-in.
A daily average significantly reduced since 2019, with 1 hours and 2 minutes in 2020, in comparison to the average of 51 minutes a day for all WakaTime users (oh so I still code more than the average? interesting!).
As always, I entirely worked under GNU/Linux (I love XUbuntu as always, even if I installed GNOME 3 on my latest laptop), and 100% with Visual Studio Code… as far as WakaTime is aware! But I use GNU Nano, Firefox and Jupyter and they are not accounted for.
Regarding projects, I used 26h of LaTeX and Java for a course I taught in Autumn 2020 (INF1 at L1 level at University Rennes 1), to write and update practical sessions sheets, project instructions and exam papers. I also worked about 20h for this map (mainly experimenting things), and less than 10 hours in every other projects.
Regarding the choice of languages, this year I mainly used Markdown (53 h) even though I’m not sure for what projects, LaTeX (30 h) and both Java and Python are tight with 13h each (on VSCode, but by counting Eclipse and Jupyter notebooks I must have at least three time more !) ; and all the other languages are about 1-5 hours by year (Bash, OCaml, JavaScript, HTML / CSS etc). But it’s unfair, as I write a lot of one-liner bash script directly in a terminal, as I use GNU Nano for small bash files, Jupyter notebooks for Python and OCaml, etc.
Short overview of my total coding time since 2015¶
Apparently, as of October 2018, I accumulated over 2529 hours of coding stats since 3 years and a half (January 2015).
That’s a lot. In over 10+3*12=46 months, I lived about 33120 hours, and slept approximately 10000 hours. So 2500 hours of coding is about 7% of my life and about 11% of my awaken life.
I spent 11% of my life coding. That’s a lot, I think (it does not count just office hours, but ALL MY LIFE since 3 years). Oh boy.
This requires to have already installed nodejs on your machine, and its packet manager npm.
This tool is based on the officiel WakaTime API, and should be easy to use.
The first command is wakatime -help which shows the different options that are accepted by the tool:
Please pass an option:
-? or -help
-u or -user
-t or -today
-y or -yesterday
-w or -week
But thanks to this sed command (` | sed -r « s:\x1B\[[0-9;]*[mK]::g ») I thought I would be able to include the output of a `wakatime command in this page.
For instance, the command wakatime -w gives the total time spent in your text editor(s) during the last 7 days.
$ wakatime -w | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g"Traceback (most recent call last): File "/usr/local/bin/wakatime", line 5, in <module> from wakatime.__init__ import executeModuleNotFoundError: No module named 'wakatime'