<?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: DC</title>
    <description>The latest articles on DEV Community by DC (@dc_c2ad9d5e16).</description>
    <link>https://dev.to/dc_c2ad9d5e16</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%2F4079852%2Fabc7655a-c04c-4ed1-bdb2-977b316ea270.png</url>
      <title>DEV Community: DC</title>
      <link>https://dev.to/dc_c2ad9d5e16</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dc_c2ad9d5e16"/>
    <language>en</language>
    <item>
      <title>Why your CSV diff tool is lying to you (and how to fix it)</title>
      <dc:creator>DC</dc:creator>
      <pubDate>Sun, 16 Aug 2026 08:01:45 +0000</pubDate>
      <link>https://dev.to/dc_c2ad9d5e16/why-your-csv-diff-tool-is-lying-to-you-and-how-to-fix-it-24jm</link>
      <guid>https://dev.to/dc_c2ad9d5e16/why-your-csv-diff-tool-is-lying-to-you-and-how-to-fix-it-24jm</guid>
      <description>&lt;p&gt;If you’ve ever diffed two CSV exports and gotten a wall of red, only to realize nothing actually changed — you’ve hit the same problem I kept running into.&lt;/p&gt;

&lt;p&gt;Most diff tools compare files line by line. That works fine for code, but it falls apart on tabular data the moment a single row gets inserted, deleted, or reordered anywhere in the file. Every row after that point shifts position, and a position-based diff reports all of them as “changed” — even though the underlying data is identical.&lt;/p&gt;

&lt;p&gt;Here’s a minimal example of the problem:&lt;/p&gt;

&lt;h1&gt;
  
  
  File A
&lt;/h1&gt;

&lt;p&gt;id,name,status&lt;br&gt;
1,Alice,active&lt;br&gt;
2,Bob,active&lt;br&gt;
3,Carol,pending&lt;/p&gt;

&lt;h1&gt;
  
  
  File B (row 2 removed)
&lt;/h1&gt;

&lt;p&gt;id,name,status&lt;br&gt;
1,Alice,active&lt;br&gt;
3,Carol,pending&lt;/p&gt;

&lt;p&gt;The fix: match rows by identity, not position.&lt;/p&gt;

&lt;p&gt;I built a diff that detects a likely key column automatically (id, _id, key, slug, code, name — whatever’s actually present) and matches rows across both files by that value instead of line number. Reordering, insertions, and deletions stop generating noise. You see exactly three things: rows added, rows removed, and cells that genuinely changed on a row that exists in both files.&lt;/p&gt;

&lt;p&gt;The same principle applies to JSON and XML — array items get matched by a detected key field rather than array index, so reordering an array in an API response doesn’t produce a diff full of false changes either.&lt;/p&gt;

&lt;p&gt;That grew into a small toolkit:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;• Conversion — JSON↔CSV, JSON↔XML, flatten/unflatten nested structures
• Diffing — JSON, CSV, XML, all key-aware as above
• Schema tooling — generate a JSON Schema from a sample, validate data against one, or render it straight to a TypeScript interface or Zod schema
• Access — a browser tool (nothing uploaded, runs entirely client-side), a CLI (npx recast-cli, works offline), and a GitHub Action for CI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Free tier covers everything above with reasonable size limits — it’s at tryrecast.app if you want to try it on your own data.&lt;/p&gt;

&lt;p&gt;Curious whether others have hit this same reordering problem and what you used to work around it — Beyond Compare, a custom script, something else?&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="http://tryrecast.app" rel="noopener noreferrer"&gt;http://tryrecast.app&lt;/a&gt;&lt;/p&gt;

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