2023 Wrapped
Since I use multiple Git forges and accounts, I cannot simply look at the pretty graph GitHub would show. I have to create it myself.
Note: This post may not be interesting to you at all. The target audience is me ten years in the future.
What I am interested in
- How many projects I have contributed to.
- How many languages I have used.
- How many commits I've made made in each of them.
- How many LOC in each language I've added and removed.
There are more, like day/time distribution, but that's less important.
Gathering the data
I wrote a terrible Python script that does this all. I'm not gonna say much; it just gets the job done.
It is available here for anyone interested.
The data
First part is the easiest to gather, this could have been done in Bash.
God bless git log --pretty
.
Metric | Count |
---|---|
Git identities | 6 |
Git repositories I've contributed to | 43 |
Commits I've authored | 1 117 |
Information about files was also relatively easy to extract. It required some very light parsing (I opted for the most dumb option, but I couldn't be bothered with anything else).
I know there is a way to convert extensions to MIME types or something human friendly, but again, the plan is to run this once a year, I can do the additional deduplication and clean up myself.
Language | Lines added | Lines removed |
---|---|---|
.containerignore | 3 | 1 |
.git-blame-ignore-revs | 3 | 0 |
.gitconfig | 35 | 5 |
Bash | 1 906 | 315 |
BibTeX | 3 106 | 463 |
Caddyfile | 15 | 1 |
Containerfile | 23 | 9 |
CSS | 598 | 2 |
CSV | 145 | 57 |
.desktop | 17 | 32 |
Gettext .po | 619 | 413 |
Gettext .pot | 249 | 199 |
Go | 9 825 | 3 217 |
Hare | 3 441 | 19 |
HTML | 624 | 67 |
INI | 222 | 103 |
Jinja2 | 118 | 2 |
JSON | 3 184 | 39 |
Jupyter Notebook | 451 | 1 |
Makefile | 400 | 72 |
Markdown | 3 236 | 1 556 |
Plaintext | 2 380 | 129 |
Python | 27 022 | 11 973 |
ReStructured Text | 507 | 128 |
RPM .spec | 1 | 2 |
Systemd service | 8 | 1 |
LaTeX | 9 225 | 4 654 |
TikZ | 300 | 54 |
TOML | 264 | 54 |
YAML | 5 459 | 893 |
Generic configuration | 309 | 20 |
unknown | 5 459 | 893 |
total | 73 882 | 24 593 |
And the third metric is commit distribution in time. The script vomits out a raw tab-separated values which I have copied over to LibreOffice and formatted. I think the result is not bad at all.
Thoughts
I've included all the data I could gather, both personal and from my work repositories.
How much is 1 117 commits? Considering this is just for 2023, the amount surprised me. Their size varies A LOT, but every single one of them is meaningful and improved the code in some way of another. Only ten to twenty are fixes of typos or comments, I swear.
I think it makes sense that the most frequent time I make commits is after lunch time. You work on a thing, you take a meal break, you come back, clean it up and commit to ensure the patch isn't lost if something happens.
It's been a wild and uneven year, as you can see from the second image. I was close to burning out twice, and I think I can see why.
It would have been nice to have this statistics just for section of the projects I've worked on (work x personal), but again, "nice" isn't good enough reason for me to make this script a well-structured project with built-in graph generation and tests.
Hit me up if you know of a multi-forge tool that does more than my script!