Readit News logoReadit News
jmforsythe commented on Ask HN: Where to find open-source house plans?    · Posted by u/tsingy
jmforsythe · 2 years ago
Could we please stop calling anything with a permissive copyright "open source"?
jmforsythe commented on Treemaps are awesome   blog.phronemophobic.com/t... · Posted by u/capableweb
jmforsythe · 2 years ago
Shameless plug for my project [0] using treemaps to visualise a git repo

[0] https://github.com/jmforsythe/Git-Heat-Map

jmforsythe commented on Treemaps are awesome   blog.phronemophobic.com/t... · Posted by u/capableweb
heatmapprq4325 · 2 years ago
I often confuse Treemaps vs Heatmaps.

This one is a treemap by the article's definition but is called a heatmap for as long as I can remember: https://www.marketbeat.com/market-data/sector-performance/

jmforsythe · 2 years ago
I was confused as my project [0] I called it a git heat map, not realising that a similar term was used for other completely different visualisations

[0] https://github.com/jmforsythe/Git-Heat-Map

jmforsythe commented on Show HN: Git Heat Map – a tool for visualising git repo activity for each file   github.com/jmforsythe/Git... · Posted by u/jmforsythe
avinassh · 3 years ago
I experimented earlier to push the limits of SQLite inserts and wrote a blog post[0] about it. We can apply some of the learnings here.

I reviewed the OP's code and did some benchmarks; SQLite is not the bottleneck here. The code first generates the commit info from the git log, prints that to stdin [1] and the python script reads from it one by one in a loop [2]. Each of the commit info is written to SQLite. So, with or without WAL, the time is almost the same.

To confirm my hypothesis, I ran the project without insert calls. On my machine, for cpython, it took 160 seconds and without sqlite inserts 159 ish.

I believe the git log will be fast anyway, so other ways to make it faster would be to read a bunch of commits at once and then do batch inserts. We can also make it run in parallel since each commit info is independent, and we don't need to care about ordering while inserting.

[0] - https://avi.im/blag/2021/fast-sqlite-inserts/

[1] - https://github.com/jmforsythe/Git-Heat-Map/blob/bd9bc22/git-...

[2] - https://github.com/jmforsythe/Git-Heat-Map/blob/bd9bc22/git-...

jmforsythe · 3 years ago
Unfortunately the commit info is not independent at the moment, and that is mostly due to wanting to track renaming/deletion of files.
jmforsythe commented on Show HN: Git Heat Map – a tool for visualising git repo activity for each file   github.com/jmforsythe/Git... · Posted by u/jmforsythe
abhishekbasu · 3 years ago
I wonder if this can somehow be used as a tool for quick visual inspection of architecture compliance. Maybe the size of the box could be selected before display to denote a custom metric. For example, if the size of the box for each file was proportional to the (number_of_lines_edited) * (current_date - file_creation_date), then modularity could demand that the size of the boxes remain small. (pardon the musings of a non software engineer on a Saturday night)
jmforsythe · 3 years ago
The size of the boxes is fairly customisable on the back end, the webpage just needs to be sent the right JSON data, and the only real criteria is that the size of each directory is the sum of the sizes of its children.
jmforsythe commented on Show HN: Git Heat Map – a tool for visualising git repo activity for each file   github.com/jmforsythe/Git... · Posted by u/jmforsythe
matt_trentini · 3 years ago
Looks great! Thanks for your work on this.

I had the same minor install issue, specifically needed to do the following:

  >chmod +x git-log-format.sh generate-db.sh
  >python -m venv .venv
  >source .venv/bin/activate
  >pip install flask
I'm not sure the colouring is working as expected; I tried submitting with many email addresses I know are in the repo it ran over (with/out the wildcard) and the highlighting behaviour was difficult to predict.

jmforsythe · 3 years ago
Do you mind sharing what specifically the colouring is doing, and what you expect it to be doing?
jmforsythe commented on Show HN: Git Heat Map – a tool for visualising git repo activity for each file   github.com/jmforsythe/Git... · Posted by u/jmforsythe
aren55555 · 3 years ago
After cloning, I had to change the perms of the .sh files, install flask via pip and hope for the best. I wasn't sure what Python version to use, I used some 3.x. It would be really nice if this was fully containerized and I could launch in docker/podman.

Also I wasn't sure how to get the colors :shrug:

jmforsythe · 3 years ago
Thanks for the feedback, I'll try to add instructions for the sh files and the python version. This is still very much a WIP so I'm not going to look into docker just yet.

For the highlighting, currently only a single email pattern input is supported. Type in your pattern into the box at the bottom, then click submit. The pattern gets fed into a LIKE statement in SQLite, so just plaintext, with % representing a wildcard eg torvalds% would highlight files modified by an email starting with torvalds.

jmforsythe commented on Show HN: Git Heat Map – a tool for visualising git repo activity for each file   github.com/jmforsythe/Git... · Posted by u/jmforsythe
llagerlof · 3 years ago
Add installation procedures.
jmforsythe · 3 years ago
What exactly do you mean? The README describes how to run the website, and how to mentions the only dependency.

u/jmforsythe

KarmaCake day87January 29, 2023View Original