<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Noah Sussman on Medium]]></title>
        <description><![CDATA[Stories by Noah Sussman on Medium]]></description>
        <link>https://medium.com/@infinite-undo?source=rss-cf218bfd4521------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dHS8ueZ8orlp3LiyUzBg1w@2x.jpeg</url>
            <title>Stories by Noah Sussman on Medium</title>
            <link>https://medium.com/@infinite-undo?source=rss-cf218bfd4521------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 07:19:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@infinite-undo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Context Rots From The Middle Out]]></title>
            <link>https://infinite-undo.medium.com/context-rots-from-the-middle-out-2d85c581096b?source=rss-cf218bfd4521------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d85c581096b</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Noah Sussman]]></dc:creator>
            <pubDate>Sun, 31 May 2026 16:08:37 GMT</pubDate>
            <atom:updated>2026-05-31T16:08:37.962Z</atom:updated>
            <content:encoded><![CDATA[<p>LLMs don’t just lose context. They lose the central context first.</p><p><a href="https://aclanthology.org/2024.tacl-1.9/">Lost in the Middle: How Language Models Use Long Contexts</a></p><p>This is such a fascinating paper. I always find myself referring to it when discussing “context rot” and memory management for LLMs.</p><p>The revelation is not that LLMs forget the conversation as it gets longer — this is well known. In fact, some of the first advice I ever received about using LLMs was “start new conversations often because the longer a conversation goes on, the worse the quality of the responses.”</p><p>No, the revelation here is in how LLMs forget — the mechanics of it.</p><p>Because LLMs are not like the deterministic computer systems we all know. Take log rotation. A disk has a certain capacity. When the disk is 90% filled, the oldest logs are discarded to make room. There is always a constant corpus of recent logs, of a size that matches the disk’s 90% capacity.</p><p>Or take a file system browser such as macOS Finder or Windows Explorer. The most recent files are sorted to the top by default. When we start to lose track of files, it is because they are older and sorted toward the bottom. We have to scroll endlessly to find them, or remember search terms that match them. Otherwise, those older files are effectively lost, even though they technically exist somewhere on disk.</p><p>LLMs are not like that at all.</p><p>According to the findings in the paper (which has been widely cited and is generally accepted as correct), LLMs do not forget the oldest information first. Instead, in a bizarre twist that mirrors the fictional video compression algorithm from the show Silicon Valley, LLMs forget information about your conversation from the middle out.</p><p>An excellent chart illustrating this appears on page 2 of the paper. The researchers scored the quality of model responses throughout conversations. The chart forms a U-shaped curve, with the lowest scores in the middle and the highest near the start and end of the conversation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*p5iY7_hJMWlBfYI23QBtow@2x.jpeg" /></figure><p>LLMs hold onto the beginning of the conversation plus whatever you just said. The center of the conversation, where all the decisions were made and the insights discovered, is incrementally forgotten until almost none of that remains in the context window, and the LLM is responding based on your original framing plus a sketchy idea of where you are at now, with almost no knowledge of how you arrived there.</p><p>I keep coming back to this paper because it explains so much about my interactions with LLMs. The incredible focus and organization that gives way to hyperfocus on unimportant details. The demonstrated ability to execute a complex task that then completely fails when attempted again later.</p><p><strong>LLMs don’t just lose context. They lose the central context first.</strong></p><p>No wonder then that “Agent Memory” is such a popular area of research in both academia and industry. Solving context rot is not a direct problem of providing more storage capacity or improving search indexing.</p><p>Context rots from the middle out, and we don’t even know why, let alone whether it can be solved.</p><p>So far only partial solutions exist.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d85c581096b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Falsehoods Programmers Believe About Time]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://infinite-undo.medium.com/falsehoods-programmers-believe-about-time-0033203f0410?source=rss-cf218bfd4521------2"><img src="https://cdn-images-1.medium.com/max/1024/0*0vEQBFpOm4eI0cxG" width="1024"></a></p><p class="medium-feed-snippet">This paper compiles two previously published posts.</p><p class="medium-feed-link"><a href="https://infinite-undo.medium.com/falsehoods-programmers-believe-about-time-0033203f0410?source=rss-cf218bfd4521------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://infinite-undo.medium.com/falsehoods-programmers-believe-about-time-0033203f0410?source=rss-cf218bfd4521------2</link>
            <guid isPermaLink="false">https://medium.com/p/0033203f0410</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[time]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[ai-safety]]></category>
            <dc:creator><![CDATA[Noah Sussman]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 11:38:12 GMT</pubDate>
            <atom:updated>2025-10-08T11:38:12.702Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[AI Risk and Agile testing]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://infinite-undo.medium.com/ai-risk-and-agile-testing-882cd251e2f4?source=rss-cf218bfd4521------2"><img src="https://cdn-images-1.medium.com/max/2600/1*V2-R9xtWAbFvWh_4eS4d-A@2x.jpeg" width="3240"></a></p><p class="medium-feed-snippet">The emerging field of AI Risk needs your applied skills. </p><p class="medium-feed-link"><a href="https://infinite-undo.medium.com/ai-risk-and-agile-testing-882cd251e2f4?source=rss-cf218bfd4521------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://infinite-undo.medium.com/ai-risk-and-agile-testing-882cd251e2f4?source=rss-cf218bfd4521------2</link>
            <guid isPermaLink="false">https://medium.com/p/882cd251e2f4</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Noah Sussman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 13:52:39 GMT</pubDate>
            <atom:updated>2025-10-01T13:52:39.672Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Agile Testing and Systems Thinking]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://infinite-undo.medium.com/agile-testing-and-systems-thinking-bc4a0de1bcf7?source=rss-cf218bfd4521------2"><img src="https://cdn-images-1.medium.com/max/2600/1*H6VP5Oo9qKl7NUsFPtzy7w@2x.jpeg" width="3240"></a></p><p class="medium-feed-snippet">Agile testing spends a lot of time investigating the outcomes of meta-criticality. We could center critical points instead. </p><p class="medium-feed-link"><a href="https://infinite-undo.medium.com/agile-testing-and-systems-thinking-bc4a0de1bcf7?source=rss-cf218bfd4521------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://infinite-undo.medium.com/agile-testing-and-systems-thinking-bc4a0de1bcf7?source=rss-cf218bfd4521------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc4a0de1bcf7</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Noah Sussman]]></dc:creator>
            <pubDate>Tue, 30 Sep 2025 11:43:24 GMT</pubDate>
            <atom:updated>2025-10-01T14:38:18.529Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Vibe coding is not going to lead to a generation of software creators who can’t program.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/vibe-coding-is-not-going-to-lead-to-a-generation-of-software-creators-who-cant-program-c0c1b47282a9?source=rss-cf218bfd4521------2"><img src="https://cdn-images-1.medium.com/max/2600/1*k-GttULvqvrvG3tH6yXNdA@2x.jpeg" width="3240"></a></p><p class="medium-feed-snippet">Vibe coding is not going to lead to a generation of software creators who do not know how to code.</p><p class="medium-feed-link"><a href="https://medium.com/swlh/vibe-coding-is-not-going-to-lead-to-a-generation-of-software-creators-who-cant-program-c0c1b47282a9?source=rss-cf218bfd4521------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/vibe-coding-is-not-going-to-lead-to-a-generation-of-software-creators-who-cant-program-c0c1b47282a9?source=rss-cf218bfd4521------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0c1b47282a9</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[no-code]]></category>
            <dc:creator><![CDATA[Noah Sussman]]></dc:creator>
            <pubDate>Fri, 26 Sep 2025 14:23:10 GMT</pubDate>
            <atom:updated>2025-09-27T16:09:04.467Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Visualizing the Rates of Change in a Codebase Over Time With git-log(1)]]></title>
            <link>https://medium.com/better-programming/visualizing-rates-of-change-in-testbase-vs-codebase-over-time-with-git-log-1-118e0c37d455?source=rss-cf218bfd4521------2</link>
            <guid isPermaLink="false">https://medium.com/p/118e0c37d455</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[command-line]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Noah Sussman]]></dc:creator>
            <pubDate>Fri, 22 May 2020 16:00:35 GMT</pubDate>
            <atom:updated>2020-05-27T01:36:52.000Z</atom:updated>
            <content:encoded><![CDATA[<h4>See how your code and test coverage has changed over the life of your codebase</h4><figure><img alt="A growing plant with live and dead branches." src="https://cdn-images-1.medium.com/max/1024/1*Y1lhnbGLmGph-1fDjp29Uw.jpeg" /><figcaption>Photo: <a href="https://unsplash.com/@jeremybishop?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jeremy Bishop</a></figcaption></figure><p>I was surprised at the reactions to a recent suggestion I made as to which metrics are useful in software quality assurance:</p><h3>Detritivore Biome on Twitter</h3><p>Ratio of test code to non-test code changed in a given time interval. https://t.co/EqVCyoriao</p><p>I was surprised that so many people saw the tweet above and immediately asked how to make the measurement in the first place.</p><p>I know that <a href="https://medium.com/better-programming/measuring-the-cadence-of-commits-in-git-history-ed58590a3b0e">measuring rate of change in Git</a> isn’t an activity usually performed by generalist software engineers. But I had assumed a higher level of familiarity in the specialist software-testing community than apparently exists. This was especially interesting because many people were interested and intuitively drawn to the metric — they just didn’t know how to derive it.</p><h3>Comparing the Rate of Change of Two Directories With git-log(1)</h3><p>Typically, a software application’s source code is laid out such that a single top-level directory contains all application code (the <em>codebase</em>), and another top-level directory contains all of the automated test code and scaffolding (the <em>testbase</em>). (If your project isn’t<em> </em>laid out this way, just please keep reading and I’ll get to how to address that. Or just scroll to the bottom of the article if you’re impatient.)</p><p>For example, imagine a Git repository where all of the codebase is in the directory app/, and the testbase is in the directory test/.</p><p>So, for example, the Git repo would look like this:</p><figure><img alt="A Mac OS Finder window showing a folder called app and a folder called test" src="https://cdn-images-1.medium.com/max/856/1*ccmzrlkPlCWBl2n9szzS3A.png" /><figcaption>A Git repo laid out such that the codebase and the testbase are in separate top-level-directories</figcaption></figure><h3>Converting git-log(1) Output to a Time Series</h3><p>The first thing to know here is that git-log(1) can take filesystem paths as parameters. So you’ll get different output from the command git log app versus the command git log test (if issued while standing in the Git repo root as pictured in the screenshot above).</p><p>However, the default output of git-log(1) is not <a href="https://www.investopedia.com/terms/t/timeseries.asp">a time series</a>.</p><p><a href="https://medium.com/better-programming/measuring-the-cadence-of-commits-in-git-history-ed58590a3b0e">Below is a script that converts the output </a>of git-log(1) to a time series. This script will produce a time series for the app directory and another time series for the test directory:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c3469d1a46501313da8c0e4e3cfae805/href">https://medium.com/media/c3469d1a46501313da8c0e4e3cfae805/href</a></iframe><p>So the output would look something like the following:</p><pre>app/<br>      1 2020-02-27<br>      1 2020-03-03<br>      2 2020-03-06<br>      3 2020-03-11<br>test/<br>      1 2020-01-13<br>      1 2020-02-12<br>      1 2020-02-25<br>      1 2020-03-05</pre><p>A line like 3 2020–03–11 means that on March 3, 2020, there were three commits to this repository made over the course of that whole day.</p><p>You can read down the left-hand side of the list to see how many commits were made on each day following the initial commit, all the way up to whatever is the commit date of the <a href="https://stackoverflow.com/questions/2304087/what-is-head-in-git">current </a><a href="https://stackoverflow.com/questions/2304087/what-is-head-in-git">HEAD</a> of the Git repository’s <a href="https://web.archive.org/web/20200429004214/https://help.github.com/en/github/administering-a-repository/setting-the-default-branch">default branch</a>.</p><h3>Drawing Inferences From the Time Series</h3><p>One thing that can immediately be inferred from the data above is the codebase and the testbase get committed to on different days. That this pattern exists in the source code would be a <em>high-signal observation</em><strong> </strong>in a real project since, ideally, application code and its supporting test code should change together as functionality is added and modified.</p><p>The shell script above is configured to only look at the last three weeks’ data. In <a href="https://codeascraft.com/2011/04/20/divide-and-concur/">a decade of continuous-integration practice,</a> I’ve found three weeks/21 days is a sufficiently wide temporal window in which trends in Git history can be observed without introducing a lot of noise from old and irrelevant source code changes.</p><p>You can change the time window from three weeks to anything you want by editing <a href="https://gist.github.com/textarcana/2658bb13b73ec6494e362cee56a1c50e#file-compare_codebase_to_testbase_in_terms_of_commits_within_an_interval-sh-L8">line 8</a> of the shell script above.</p><h3>Comparing the Rate of Change of Two Arbitrary Filesets</h3><p>At the beginning of this article, I acknowledged that not everyone’s project is arranged into a codebase and testbase top-level directory structure.</p><p>Fortunately, no matter how a codebase and testbase are laid out, you can always visualize the Git history of both distinct sets of files — both <em>filesets</em>— by using <a href="https://en.wikipedia.org/wiki/Find_(Unix)">find(1)</a> to filter your source tree. This works because git-log(1) can take more than one path as an argument.</p><p>So it’s just a matter of using find(1) to make two collections of paths: one for the codebase and one for the testbase.</p><p>For instance, if your test files are stored side by side with your code files, then you can extract the paths of just your test files with find(1), as shown in the shell script below. In this example, I assume that all test filenames end with Test.php, so all test files are named something like exampleTest.php.</p><p>Here’s how to find all files ending in Test.php, regardless of where that file is located within the Git repository’s filesystem:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b52bda2626cec3157e2b64e934b1cf5/href">https://medium.com/media/7b52bda2626cec3157e2b64e934b1cf5/href</a></iframe><p>This will produce output similar to that shown above, except in this case only the history of the testbase is shown:</p><pre>      1 2020-01-13<br>      3 2020-02-12<br>      1 2020-02-25<br>      1 2020-03-05</pre><p>As before, this time series represents the total number of commits<strong> </strong>to all Test.php files over the past three weeks. And you can change the time window to whatever you want <a href="https://git-scm.com/docs/git-log#Documentation/git-log.txt---sinceltdategt">by changing</a> the --since parameter on <a href="https://gist.github.com/textarcana/02e4b689ba7a1774a135ba13674d847e#file-find_files_for_git_log-sh-L4">line 4</a> to some date other than three weeks ago.</p><p>Now, let’s move onto printing out the history of the codebase so it can be compared with the history of the testbase.</p><p>Assuming all your application files have a common extension, say .php, then you can collect the paths of all your codebase files (all of the files that could potentially be under test) with find(1) as follows:</p><pre>find . -name &quot;*.php&quot; -not -name &quot;*Test.php&quot;</pre><p>This will print out a list of all the files that end in .php except for those that end in Test.php, which will be omitted from the list.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0a52ab2d469be47e232dc0ffd6b48fd/href">https://medium.com/media/c0a52ab2d469be47e232dc0ffd6b48fd/href</a></iframe><p>Like the script we used to look at testbase files, this script would produce a time series showing days when commits were made to codebase files, something like the following:</p><pre>      1 2020-01-13<br>      1 2020-02-12<br>      1 2020-02-25<br>      1 2020-03-05</pre><p>No matter how your codebase is laid out, you can use find(1) to collect the paths of your codebase and your testbase files so you can pass those paths into git-log(1) and compare the two histories!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=118e0c37d455" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/visualizing-rates-of-change-in-testbase-vs-codebase-over-time-with-git-log-1-118e0c37d455">Visualizing the Rates of Change in a Codebase Over Time With git-log(1)</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Measure the Cadence of Commits in Your Git History]]></title>
            <link>https://medium.com/better-programming/measuring-the-cadence-of-commits-in-git-history-ed58590a3b0e?source=rss-cf218bfd4521------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed58590a3b0e</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Noah Sussman]]></dc:creator>
            <pubDate>Wed, 29 Jan 2020 20:07:04 GMT</pubDate>
            <atom:updated>2020-01-31T21:28:03.447Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to mine data from the git log in order to construct test oracles</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*16E8YzGksHOQxm9FvysEtA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@mn24?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Michael Nöthiger</a> on <a href="https://unsplash.com/s/photos/patterns?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>The Git Log as a Source of Oracles</h3><p>In order to properly test the source code in a Git repository for any abstract definition of “quality,” we need to first establish some baseline measurements of the source code itself. In software QA these baseline measurements are generally called <strong>oracles.</strong></p><p>In software QA jargon, “<strong>oracle” </strong>is the general term for the methods we use to evaluate the correctness of a test or suite of tests. When someone looks at your test results and asks “how much confidence do you have in those test results?” whatever you answer them with, is an <strong>oracle. </strong>In terms of software testing theory, an <strong>oracle</strong> is a necessary component of any complete test.</p><p>What oracles can we look to when testing the quality of source code in a Git repository? One is the <strong>cadence of commits</strong> in Git history: How often is code committed? Knowing this, it then becomes possible to test assumptions about (for instance) how often new code is put into production, or how often existing code is refactored.</p><h3><em>Constructing an Oracle: “Cadence of Commits</em>”</h3><p>In the rest of this piece I’m going to build up an increasingly granular measurement of <strong>cadence of commits, </strong>starting with the absolute simplest use case for counting commits in Git history. I hope this will be practically useful (the code shown here will work with any Git repo) and that it will also help to show how to construct oracles from data generally.</p><pre>git log --pretty=oneline | wc -l</pre><p>The one-line shell script above prints out the number of commits in the Git log (for the current branch). What does the count mean? It’s an oracle, so its exact meaning is contextual.</p><p>However, the raw number of commits in a repo is a useful data point on the frequency with which a codebase gets touched by its authors. For instance, relatively few commits in a longstanding repo would indicate that development has historically been performed in large batches, rather than the preferred pattern of many small commits over time.</p><p>In order to determine the age of a Git repo, use the following one-line shell script:</p><pre>git log --date=relative --reverse --format=&quot;%ad&quot; | head -n1</pre><p>This will print out the relative age of the repo, which will be a string something like 36 months ago to indicate that your repo was created 36 months ago.</p><p>In order to get a general idea of the cadence of commits in any Git repo, you could now write a three-line shell script, like the one below, which should print something like 360 commits since 36 months ago:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0937a79642c3180ae366ada7dfa5a48/href">https://medium.com/media/e0937a79642c3180ae366ada7dfa5a48/href</a></iframe><p>Once you have the age of a Git repository, plus a count of how many commits are in its history, you can have a metric composed of more than one variable — something that’s all-too-rare when it comes to measurement!</p><p>However, the shell script above does not really get at “cadence” because we cannot use its output to invalidate assumptions about how code is committed <em>over time.</em></p><h3>Cadence of Commits Over Time</h3><p>The Git log contains entries with timestamps but it’s not a time series. Rather, the git log command is a client for running queries against a complex data structure stored in the.git directory.</p><p>The most direct way to build a time series out of the timestamps of commits in the Git log is to extract all the timestamps of all the commits and then count how many commits fall into a certain period of time.</p><p>For instance, how many commits per month, over the lifetime of the repo? It turns out this question can be answered with relatively few lines of code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e6db6980b9de4ca60f780acf60e2a752/href">https://medium.com/media/e6db6980b9de4ca60f780acf60e2a752/href</a></iframe><p>The script above is admittedly terse and dense. It should print something like this:</p><pre>53    2017-09<br>82    2017-12<br>20    2018-01<br>66    2018-02<br>49    2018-09<br>11    2018-10<br>35    2018-11<br>41    2019-07<br>23    2020-01</pre><p>The output is tab-delimited, meaning that if you redirect it to a file and give that file a .tsv extension, you can import it into Excel or Google Sheets and immediately make a visualization of commits-per-month in your repository. You can also perform standard data analysis tasks such as finding the average, median, and standard deviation of commits-per-month in your Git repository.</p><p>Note that months are calculated according to <em>your current time zone.</em> If you aren’t in your office’s time zone, you can change the value of the TZvariable at the beginning of the script to reflect the time zone that most of your work happens in — e.g.: TZ=-0500. Alternately, you could set TZ=UTCif your team is globally distributed.</p><h3>Weekly Cadence Of Commits</h3><p>Although monthly cadence is the most direct way to a time-series measurement of a Git repo, it would be more useful to derive the <em>weekly </em>cadence of activity, since for the most part software teams plan in terms of (blocks of) weeks.</p><p>The weekly cadence of commits can be calculated using dateroundfrom the <a href="http://www.fresse.org/dateutils/">dateutils</a>package:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ac928654c021533d0a6c9bd8170bbdf/href">https://medium.com/media/7ac928654c021533d0a6c9bd8170bbdf/href</a></iframe><p>This will again output tab-separated values (TSV) that you can save directly to a file with the .tsv extension and then use a data visualization tool to visualize.</p><p>I will now conclude, since having drilled down to the weekly cadence of commits<strong> </strong>we’ve arrived at a Git measurement that’s granular enough to be of use when talking about code quality. In other words, we have arrived at a useful oracle!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed58590a3b0e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/measuring-the-cadence-of-commits-in-git-history-ed58590a3b0e">Measure the Cadence of Commits in Your Git History</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>