<?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: Erdi BAY</title>
    <description>The latest articles on DEV Community by Erdi BAY (@erdibay).</description>
    <link>https://dev.to/erdibay</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%2F4022152%2F1f40d25c-da21-4e26-bea5-5f9eff3684f4.png</url>
      <title>DEV Community: Erdi BAY</title>
      <link>https://dev.to/erdibay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/erdibay"/>
    <language>en</language>
    <item>
      <title>I Went Looking for the Diff Debt in My Own Repo</title>
      <dc:creator>Erdi BAY</dc:creator>
      <pubDate>Tue, 21 Jul 2026 09:40:21 +0000</pubDate>
      <link>https://dev.to/erdibay/i-went-looking-for-the-diff-debt-in-my-own-repo-2o8i</link>
      <guid>https://dev.to/erdibay/i-went-looking-for-the-diff-debt-in-my-own-repo-2o8i</guid>
      <description>&lt;p&gt;Two posts ago I said I'd shipped code I never read. It's easy to write that as a general observation about the industry. It's less comfortable to go open your own repo and count.&lt;/p&gt;

&lt;p&gt;So I did. Here's what I found, and what I've actually done about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The repo
&lt;/h2&gt;

&lt;p&gt;It's a desktop app I built for my own company. Roughly fourteen thousand lines of Python, a Tkinter UI, invoicing and documents and reports, the kind of internal tool nobody else will ever see. I had never written Python before I started it. I built it anyway, with a lot of AI help, learning as I went.&lt;/p&gt;

&lt;p&gt;That combination - no prior experience, heavy AI assistance, a real deadline because the business actually needed the thing - is basically a diff debt factory. I wasn't cutting corners on purpose. I just didn't have the knowledge to evaluate half of what I was merging, and it worked, so I moved on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I actually found
&lt;/h2&gt;

&lt;p&gt;The clearest example took me months to notice.&lt;/p&gt;

&lt;p&gt;Five different parts of the app generate PDFs. Quotes, proformas, reports, petitions, heat treatment certificates. Every one of them was failing, in different ways, at different times, and I kept fixing them individually. Different error, different module, different patch.&lt;/p&gt;

&lt;p&gt;The actual cause was one thing: LibreOffice wasn't installed on the machine. Every one of those modules quietly depended on it to do the document conversion. Not one of them said so anywhere. I'd merged that dependency five separate times without ever registering that I'd taken it on.&lt;/p&gt;

&lt;p&gt;That's diff debt in its purest form. The code wasn't messy. It wasn't badly written. It just made an assumption I'd never read, and I paid interest on it five times over before I understood the principal.&lt;/p&gt;

&lt;p&gt;There were smaller ones too. A path handling bug that only showed up because my Windows username has a Turkish character in it - the code assumed ASCII and nobody, including me, had thought about it. Two Python versions installed side by side, quietly fighting. A stray quotation mark in my system PATH that broke things in ways that looked like code problems for days.&lt;/p&gt;

&lt;p&gt;None of these were hard bugs. They were just bugs in code I'd never actually read.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I do now
&lt;/h2&gt;

&lt;p&gt;I want to be honest about this part, because the tidy answer would be "I went back and reviewed everything." I didn't. Fourteen thousand lines I mostly didn't write is not a realistic weekend project, and pretending otherwise would just be a different kind of lie.&lt;/p&gt;

&lt;p&gt;What I do instead:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I audit on failure.&lt;/strong&gt; When something breaks, that module gets its first real read. Not a patch - an actual sit-down-and-understand-it pass. It's reactive, and it means I'm paying interest before principal, but it's the only version of this I'll actually stick to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I write down what I learn, right then.&lt;/strong&gt; The LibreOffice thing is in the README now. Obvious in hindsight, but the whole problem was that it lived nowhere except in code nobody had read. If a module gets its first real read, that read has to leave something behind or I'll be doing it again in six months.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I stopped merging things I can't explain.&lt;/strong&gt; This is the only genuinely preventive one, and it's the one that matters. If I can't say out loud why a change is correct, it doesn't go in. Not "the tests pass." Not "it looks right." Why it's correct. Sometimes that means asking the model to explain itself and then checking whether the explanation actually holds. Sometimes it means I sit there for twenty minutes on a diff I could have merged in one.&lt;/p&gt;

&lt;p&gt;That last one feels slow. It is slow. But it's slow in the same way that reading a contract before signing it is slow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I got wrong
&lt;/h2&gt;

&lt;p&gt;For a long time I thought the problem was AI writing bad code. That's not it. Most of what I merged was fine. Some of it was better than what I'd have written myself at the time.&lt;/p&gt;

&lt;p&gt;The problem was that the code entered my repo without ever entering my head. Quality had nothing to do with it. A perfectly good module I don't understand is still a module I can't debug, can't extend, and can't hand to anyone else.&lt;/p&gt;

&lt;p&gt;I'm not going to pretend I've paid this off. I've got a repo with thousands of lines in it that I'd struggle to walk you through, and I'm going to be finding out about them one incident at a time for a while yet.&lt;/p&gt;

&lt;p&gt;But at least now I know I'm carrying it. That's the difference between debt and a surprise.&lt;/p&gt;

</description>
      <category>technicaldebt</category>
      <category>ai</category>
      <category>python</category>
      <category>codereview</category>
    </item>
    <item>
      <title>Technical Debt vs Diff Debt, and Why I Stopped Treating Them as the Same Thing</title>
      <dc:creator>Erdi BAY</dc:creator>
      <pubDate>Thu, 16 Jul 2026 10:16:58 +0000</pubDate>
      <link>https://dev.to/erdibay/technical-debt-vs-diff-debt-and-why-i-stopped-treating-them-as-the-same-thing-2e66</link>
      <guid>https://dev.to/erdibay/technical-debt-vs-diff-debt-and-why-i-stopped-treating-them-as-the-same-thing-2e66</guid>
      <description>&lt;p&gt;I started using the term &lt;em&gt;diff debt&lt;/em&gt; a couple of weeks ago, and the first reaction I got was pretty consistent: "isn't that just technical debt?"&lt;/p&gt;

&lt;p&gt;It isn't. And honestly, the gap between the two is the entire reason I needed a new word for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical debt, the version we already know
&lt;/h2&gt;

&lt;p&gt;Ward Cunningham gave us the technical debt metaphor back in the early 90s, and it stuck because it's accurate. You ship something quick and messy to hit a deadline, and you pay interest on it later, every time you have to work around the shortcut you took.&lt;/p&gt;

&lt;p&gt;The part that never gets said out loud is that technical debt assumes you &lt;em&gt;understood&lt;/em&gt; what you shipped. You picked the hacky solution over the clean one on purpose. You could open that file right now and explain, line by line, why it's ugly and what the "right" version would look like.&lt;/p&gt;

&lt;p&gt;That's the thing about technical debt: it's honest. You signed for the loan. You know roughly how much you borrowed, and you usually have some idea of when you'll pay it back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Diff debt is the debt you never read the terms on
&lt;/h2&gt;

&lt;p&gt;Now picture a different situation. A PR lands. 400 lines. Tests pass, CI's green, it's late, and it came from someone (or something) you trust. You scroll through it, nothing jumps out, you approve.&lt;/p&gt;

&lt;p&gt;You didn't take a shortcut. You just didn't really read it.&lt;/p&gt;

&lt;p&gt;That code is in production now, and if it breaks next month, here's what you'll find out: nobody on the team can actually explain it. Not because it's clever, but because no human ever built a model of it in their head. It got generated or copy-pasted or waved through, and now you're not debugging a bug, you're reverse-engineering a decision that nobody actually made.&lt;/p&gt;

&lt;p&gt;That's diff debt. Technical debt is a mess you chose. Diff debt is a mystery you inherited from your own repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where they actually split
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Technical Debt&lt;/th&gt;
&lt;th&gt;Diff Debt&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;How you got it&lt;/td&gt;
&lt;td&gt;Chose a shortcut&lt;/td&gt;
&lt;td&gt;Skipped the reading&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Do you understand the code?&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Do you know how deep you're in?&lt;/td&gt;
&lt;td&gt;Roughly, yes&lt;/td&gt;
&lt;td&gt;No idea until it bites&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can you plan the payoff?&lt;/td&gt;
&lt;td&gt;Usually&lt;/td&gt;
&lt;td&gt;You don't know it's there&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The reason this matters: technical debt sits on your balance sheet where you can see it and schedule it into a sprint. Diff debt is off the books completely, right up until an incident drags it into the light. You can't prioritize a liability you don't know you have.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this got so much worse recently
&lt;/h2&gt;

&lt;p&gt;For most of the history of writing software, diff debt barely existed, because &lt;em&gt;producing&lt;/em&gt; code was the slow part. If a person wrote 400 lines, a person understood 400 lines. Making the diff and understanding the diff cost about the same.&lt;/p&gt;

&lt;p&gt;AI broke that. A clean, confident, tested-looking 400-line change can show up in seconds now, and it's practically engineered to look mergeable. But reviewing it didn't get any faster. If anything it got harder, because generated code stays confident even when it's quietly wrong.&lt;/p&gt;

&lt;p&gt;So the pressure to just ship it is huge. The diff looks right, the pipeline's green, click merge. And every time that happens without anyone really reading it, you're not saving time. You're borrowing it at a rate you can't see.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to tell if your team has it
&lt;/h2&gt;

&lt;p&gt;You've got diff debt if any of this sounds familiar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A PR gets approved faster than a human could have read it.&lt;/li&gt;
&lt;li&gt;There's a 500-line diff with a two-minute "LGTM" on it.&lt;/li&gt;
&lt;li&gt;Something breaks and the answer to "who wrote this?" is a shrug, or a tool's name.&lt;/li&gt;
&lt;li&gt;There's a file nobody wants to touch, and it got merged in one shot rather than built up over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice none of this is about code quality. Beautiful code can be pure diff debt. The tell isn't how it reads, it's whether there's a mind behind it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Paying it down
&lt;/h2&gt;

&lt;p&gt;You fix technical debt by refactoring. Diff debt is different, because the only real cure is understanding, and the cheapest time to buy that is before you merge.&lt;/p&gt;

&lt;p&gt;A few things that help: make an approval actually mean "I understood this," not "I didn't spot anything scary." Keep diffs small enough to read, no matter who or what produced them. And when the author is a model, still make someone walk through why the change is correct. If nobody can, that's not a green light. That's the interest showing up early.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, not the same thing
&lt;/h2&gt;

&lt;p&gt;Technical debt is a loan you took out with your eyes open. Diff debt is one you signed without reading, and the ugly part is you might not find out you signed it until it's due.&lt;/p&gt;

&lt;p&gt;A diff you didn't read is a bill you never held up to the light: it spends just fine, right up until the one time it doesn't.&lt;/p&gt;

&lt;p&gt;Both cost you. But at least with technical debt, you know you're in it.&lt;/p&gt;

</description>
      <category>technicaldebt</category>
      <category>ai</category>
      <category>codereview</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Diff Debt: Every AI-Generated PR You Merge Without Reading Is a Loan</title>
      <dc:creator>Erdi BAY</dc:creator>
      <pubDate>Thu, 09 Jul 2026 05:24:58 +0000</pubDate>
      <link>https://dev.to/erdibay/diff-debt-every-ai-generated-pr-you-merge-without-reading-is-a-loan-91l</link>
      <guid>https://dev.to/erdibay/diff-debt-every-ai-generated-pr-you-merge-without-reading-is-a-loan-91l</guid>
      <description>&lt;p&gt;&lt;em&gt;diff debt (n.) — the accumulated risk of merging AI-generated diffs that no human has actually read.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  I shipped code I've never read. So did you.
&lt;/h2&gt;

&lt;p&gt;Here's a confession. A few months ago I built a desktop automation bot called Erci — GUI, computer vision, license system, the whole thing. It works. People use it. And I have never truly read most of its code.&lt;/p&gt;

&lt;p&gt;I'm not even a professional developer. I described what I wanted to an AI assistant, it produced the code, I ran it, and when it worked, I moved on. Thousands of lines accumulated this way. The bot is great — until something breaks in a module I've technically "owned" for months, and I open the file and realize I'm reading it for the first time.&lt;/p&gt;

&lt;p&gt;If you're a professional developer, your version of this story is more subtle but structurally identical: the agent produces a plausible 900-line diff, the checks are green, the sprint is on fire, you skim, you approve, you merge. The pull request looked perfect. That's exactly the problem — it &lt;em&gt;looked&lt;/em&gt; perfect.&lt;/p&gt;

&lt;p&gt;I started calling this &lt;strong&gt;diff debt&lt;/strong&gt;: the gap between what was merged and what was actually reviewed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it needs its own name
&lt;/h2&gt;

&lt;p&gt;We already have good words for the neighborhood. &lt;em&gt;Technical debt&lt;/em&gt; lives in the code — shortcuts you consciously took. &lt;em&gt;Verification debt&lt;/em&gt; (a framing AWS CTO Werner Vogels pushed at re:Invent 2025) is the macro cost of inadequately checking AI output. &lt;em&gt;Comprehension debt&lt;/em&gt; (Addy Osmani's term) is the erosion of the mental model you used to build for free just by writing code yourself.&lt;/p&gt;

&lt;p&gt;Diff debt is the unit-level version. It accrues one unread pull request at a time, which is exactly why it's invisible: no single skimmed diff feels like a decision. Nobody chooses to stop understanding their codebase. It happens 400 green-checked lines at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The math got broken
&lt;/h2&gt;

&lt;p&gt;Generation got fast. Review didn't.&lt;/p&gt;

&lt;p&gt;An engineer writing 500 lines by hand builds understanding as a side effect of writing. An agent producing 5,000 lines in six minutes produces zero understanding — that work is now a separate, unpaid job called review, and the numbers say it isn't happening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sonar's 2026 survey of 1,100+ developers found roughly &lt;strong&gt;42% of committed code is now AI-generated&lt;/strong&gt; — projected to hit 65% by 2027.&lt;/li&gt;
&lt;li&gt;The same survey: &lt;strong&gt;96% of developers don't fully trust&lt;/strong&gt; AI-generated code to be correct, yet &lt;strong&gt;only about half always check it&lt;/strong&gt; before committing. That spread between distrust and verification &lt;em&gt;is&lt;/em&gt; diff debt accruing in real time.&lt;/li&gt;
&lt;li&gt;Since AI tool adoption, average PR sizes have roughly tripled in many orgs — diffs that used to be 100–200 lines now arrive at 400–600. A 400-line diff can be read. A 4,000-line diff can only be skimmed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How the interest compounds
&lt;/h2&gt;

&lt;p&gt;Like financial debt, diff debt charges interest. Unread code becomes the foundation for the next unread diff. Six months later a production incident lands at 2 a.m. in a module that "someone" reviewed, and the debugging session costs more than writing the feature from scratch would have. Refactors stall because nobody can predict what breaks. Onboarding slows because there's no one to ask — the author was a model, and the reviewer was a glance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Paying it down
&lt;/h2&gt;

&lt;p&gt;You can't read everything; the volume math doesn't allow it anymore. Paying down diff debt means spending review attention where wrongness is expensive:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Risk-tier your reviews.&lt;/strong&gt; Anything touching money, auth, data deletion, or external side effects gets a real human read. Boilerplate can pass on green checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cap diff size.&lt;/strong&gt; If the agent hands you 4,000 lines, make it deliver in reviewable increments. Reviewability is a feature; demand it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Demand tests that encode intent&lt;/strong&gt; — not tests the model wrote to flatter its own implementation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track comprehension like a metric.&lt;/strong&gt; If nobody on the team can explain a module, treat it as an outage waiting for a date.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The teams that win the next few years won't be the ones that generate the most code. They'll be the ones that know, with confidence, what's actually in theirs.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I documented the full definition at &lt;a href="https://diffdebt.com" rel="noopener noreferrer"&gt;diffdebt.com&lt;/a&gt;. If your team has its own name for this, I'd genuinely like to hear it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
