<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yaroslav H</title>
    <description>The latest articles on DEV Community by Yaroslav H (@yaroslav_h).</description>
    <link>https://dev.to/yaroslav_h</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4143095%2F848ba2c0-fd5b-4b40-a452-c7eb7a5779af.jpg</url>
      <title>DEV Community: Yaroslav H</title>
      <link>https://dev.to/yaroslav_h</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yaroslav_h"/>
    <language>en</language>
    <item>
      <title>I Built a Leaderboard to Compare How Much Code I Write With My Friends</title>
      <dc:creator>Yaroslav H</dc:creator>
      <pubDate>Fri, 25 Sep 2026 20:26:28 +0000</pubDate>
      <link>https://dev.to/yaroslav_h/i-built-a-leaderboard-to-compare-how-much-code-i-write-with-my-friends-l19</link>
      <guid>https://dev.to/yaroslav_h/i-built-a-leaderboard-to-compare-how-much-code-i-write-with-my-friends-l19</guid>
      <description>&lt;p&gt;I wanted a simple thing: a chart of how much code I write each day, commits and lines added and deleted, and a board where I could compare that with a few friends. It turned into a small puzzle about what GitHub actually knows, so here is how it works.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdv25tzhl49fkk1x41ftu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdv25tzhl49fkk1x41ftu.png" alt="Monthly Lines-per-Day Chart on the Personal Page" width="800" height="867"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What GitHub gives you
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Commits per day: yes.&lt;/strong&gt; The contribution calendar (the green squares) is available through the GraphQL API as &lt;code&gt;contributionsCollection&lt;/code&gt;. One call per person gives a whole year of daily counts. That part is easy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lines per day: no.&lt;/strong&gt; GitHub does know lines added and deleted, but only through the &lt;code&gt;stats/contributors&lt;/code&gt; endpoint, and it answers per repo and &lt;strong&gt;per week&lt;/strong&gt;, not per day. It also returns &lt;code&gt;202 Accepted&lt;/code&gt; the first time you ask for a repo while it computes the numbers in the background, so you have to come back later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Private repos: mostly no.&lt;/strong&gt; An app that only asks for your public profile sees your public repos. Your private and work repos show up as a count of "restricted contributions" and nothing else. I wrote up the details of why there is no stats-only permission &lt;a href="https://gitstats.org/blog/private-github-commits-without-repo-scope" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So from GitHub alone you get daily commits, weekly lines, and nothing about private work.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Gitstats does it
&lt;/h2&gt;

&lt;p&gt;Your own computer has the full history of every repo you've cloned, so the real per-day numbers are one git command away:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log origin/main --no-merges --numstat --author=you@example.com --since="1 year ago"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;--numstat&lt;/code&gt; prints added and deleted lines per file for each commit, and each commit has a date. Group by day and you have lines per day, for public, private and work repos alike.&lt;/p&gt;

&lt;p&gt;Gitstats has a small CLI that does exactly that, once a day in the background. It sends only the numbers per day and per week, plus a keyed hash of the repo's remote so the server can match the same repo across machines. No code, no file names, and repo names only if you turn them on. It's one file you can read before running it.&lt;/p&gt;

&lt;p&gt;This way it can display your full detailed stats (lines per day, commits, repo activity) without token access to any of your repos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3qo53tvpuq7la8habfrx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3qo53tvpuq7la8habfrx.png" alt="Friends Leaderboard" width="800" height="869"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the numbers are (and aren't)
&lt;/h2&gt;

&lt;p&gt;Lines include lockfiles, docs and generated code, and I count the default branch only. So the numbers are big and noisy, and they are not a measure of how good anyone's work is. For my friends and me it's a scoreboard and a way to notice patterns: which weekday I actually get things done, when a side project went quiet, how much changed when I started using coding agents. If you prefer, commits are one click away.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvmqegaassxsmv1q8tqdy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvmqegaassxsmv1q8tqdy.png" alt="Personal Page Charts" width="800" height="867"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Type your GitHub handle at &lt;a href="https://gitstats.org" rel="noopener noreferrer"&gt;https://gitstats.org&lt;/a&gt; and see your year in a few seconds, no sign-in (only public repo data).&lt;/li&gt;
&lt;li&gt;Demo board: &lt;a href="https://gitstats.org/demo" rel="noopener noreferrer"&gt;https://gitstats.org/demo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Sign in with GitHub for your own page and a crew, and run &lt;code&gt;npx @yaroslavhaidash/gitstats-cli@latest link&lt;/code&gt; to add private repos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's open source under MIT: &lt;a href="https://github.com/yaroslavhaidash/gitstats" rel="noopener noreferrer"&gt;https://github.com/yaroslavhaidash/gitstats&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm curious what other people would want from their own coding stats, or what's missing from this.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>opensource</category>
      <category>github</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
