DEV Community

27,865 lines of Notifio survive at HEAD, they were written on 16 days, and three of those days wrote 62 per cent

A few days ago I published Every line of our 117 page site was written on 15 days about a different product. Notifio, the rental alert app, has been the subject of more of my posts than any other repository, so I owed it the same question. Which days wrote the code that is still here?

Method

For each tracked text file I ran git blame --line-porcelain -w -M -C HEAD and counted lines by the author date of the commit that last touched them. The flags ignore whitespace-only changes and follow lines that were moved or copied between files, so a reformat does not steal credit.

What I counted:

  • Extensions ts, tsx, js, mjs, css, json, md, yml
  • Not lockfiles, not tsconfig.tsbuildinfo, not the generated renderer folder
  • 161 files and 27,865 lines, in the desktop app and the website together

This measures surviving lines, not effort. A day that wrote 3,000 lines that were later deleted scores zero, which is the point of the exercise.

The result

The repository has 57 commits, and the surviving lines come from only 16 distinct days.

Day Lines Share What the commits were
14 Sep 7,080 25.4% International pricing, Managed Payments and the content pages
27 Jul 5,896 21.2% Five commits, mostly "made changes to app"
21 Jul 4,207 15.1% Eleven commits, including the front-end redesign and bundled Chromium
22 Sep 4,150 14.9% Desktop notifications and live per-search state
20 Jul 2,361 8.5% The first commit and the next three
22 Jul 1,277 4.6% Nine commits
18 Oct 978 3.5% Local currency pricing and self-hosted fonts
28 Jul 904 3.2% Five commits

The top three days account for 61.7 per cent. The first week of work, 20 to 28 July, accounts for 53 per cent.

Everything after the end of September is 5 per cent of the codebase, from five days of commits that mostly touched a handful of lines each. The last two commits, on 30 November, are the dependency updates. They own 48 lines, or 0.2 per cent. Dependency updates mostly change version strings, which is why they barely register.

The two halves are not the same project

Split by folder, the app has 13,431 live lines from 9 days, and the website has 14,434 from 15 days. That fits how the work went.

The app was a burst: nearly all of it was written in the first nine days, and the only later contributions are a notification feature and some small fixes. The website kept growing in steps, because pages, pricing and structured data were each added when they were needed.

If you open the site you are mostly looking at September code, and the app you get from the download page is mostly July's.

Three things I take from it

  • Commit messages tell you nothing about size. The 27 July day is five commits called "made changes to app" and it wrote more than a fifth of what runs today. I wrote about this in my git history post: 28 of the 57 subjects say some form of "made changes". Blame is the only view that recovers what they hid.
  • Rewrites are invisible in a commit count. The video studio I added and later removed does not appear at all, because none of its lines survived. Blame only sees what is still standing.
  • The oldest code is the core. Anything that has not been touched since July is either stable or untested enough to avoid touching. I cannot tell which from blame alone, and I would not want to assume.

Reproduce it

for f in $(git ls-files '*.ts' '*.tsx'); do git blame --line-porcelain -w -M -C HEAD -- "$f" | grep '^author-time '; done | awk '{print strftime("%Y-%m-%d", $2)}' | sort | uniq -c

On a repository with a few hundred files this takes a minute. The numbers above include more extensions than that one-liner, but the shape is the same on any codebase with a first week of heavy work.

The product is live and the pages I mention are all linked from notifio.app/about.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.