Identifying Code Churn With AskGit SQL

AskGit commit stats table
git log --format=format: --name-only --since=12.month \
| egrep -v '^$' \
| sort \
| uniq -c \
| sort -nr \
| head -50
  1. Why does commit count alone matter? Should lines of code added or removed per commit be incorporated? Maybe a commit should only be counted if it has a minimum number of changes.
  2. Why do I care about files that may have been churning 8 months ago but have since stabilized? Shouldn’t I prioritize more recent churning? Can I discount older commits in my final sorting?
  3. What about files that have been removed or renamed? The output above includes them in the final list, even though they’re no longer in the latest source tree, adding some noise.
  4. What if individual files is too granular a view? Maybe I care more about certain directory levels if that’s how my features are organized. Maybe I want to ignore certain directories and file extensions altogether (or only look at certain ones).
  5. Can I incorporate commit authors into my churn analysis? Maybe I only want to look at churn for certain authors or groups of authors (such as a team). Churn across a large monorepo may be valuable generally, but what if I only care about the touch points my team has had with the code?

--

--

--

Building tools for software and data engineers

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Building a clone of sendinblue.com

[Online Courses]Prince 2 Agile Course

Organizing a technical conference — MKE DOT NET 2017, in Review

Fighting Impostor Syndrome as a CS Student

A Quick Recap of my past Tech Experience

Cardahub Marketplace Public Testnet Release

Eat Your Own Dog Food: distribute a beta version of your iOS app using Apple Enterprise Developer…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Augmentable Software

Augmentable Software

Building tools for software and data engineers

More from Medium

Make the DB Optimized

Normalization (1 NF )

What Is A Partition In Oracle?

The SQL Null ambiguity