Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Developer basics

diff

basicwidespread

A diff is a line-by-line comparison of two versions of text or program code, showing what was added, deleted, or changed.

In plain terms

Imagine you receive two versions of a contract and want to know what was changed. Instead of reading both in full, you put them side by side and mark the differences with a highlighter. A diff tool does the same automatically, in moments: it shows only the difference, not the full text.

In most current tools, the display is similar: deleted lines are red and have a minus sign in front, while new lines are green and get a plus sign. If a line has been modified, you usually see it as a deleted line and an added line one below the other. Many tools also highlight the changed words within a line.

It is a daily tool for developers because software is built from a series of small changes, and every change is reviewed in diff form before being accepted. In the AI era, it has become even more important: when a coding agent touches your files, the diff shows exactly what it changed. This is your most important control point.

How is it different from Word's track changes? The diff does not record modifications during editing but compares two completed states afterward. It works on any two text files, even if no one tracked what happened in between. (Word's 'Compare' function is actually such a post-hoc comparison.)

How it works

  1. The program receives the two versions, the old and the new, and breaks both down into lines.
  2. It identifies the lines that appear in the same order in both versions. This is the common skeleton; everything else is measured as a deviation against it.
  3. Items appearing only in the old version are marked for deletion (minus, red in most tools), while those appearing only in the new version are marked for addition (plus, green).
  4. It organizes differences into small blocks and places a few unchanged lines next to each one so you can see which part of the file you are viewing.
  5. The result can be saved, sent to someone else, and applied on top of the old version, which turns it into the new one. Sending changes and code review rely on this, and version control systems show as a diff what changed between two states.

An everyday example

You ask a coding agent to fix a bug in your webshop's code. Before saving anything, it shows you the diff: three red lines disappear, five green lines appear. You then decide whether to approve the change.

Who is affected

developerDaily, it reviews its own work, that of colleagues, and of coding agents based on diffs before it is merged into the shared codebase. → Code
entrepreneur, executiveIf an AI agent works on your company's code or documents, the diff shows verifiably what changed and what did not.
lawyer, citizenComparing versions of contracts and legal texts operates on the same principle, where it is often called document comparison or "redline". → Law
employeeIf you have an AI tool rewrite text or a spreadsheet, the changes view helps you notice if something you did not request was modified. → Work & HR

A common misconception

MythIf the diff looks correct, then the modification is definitely good.
In realityThe diff only shows what changed, not whether the change is correct or what it breaks elsewhere. A single-line modification can cause an error at a distant point in the program, so it does not replace testing.

Limits and risks

Similar, but not the same

Related concepts

Broader

version control, software development

Narrower

unified diff, side-by-side diff

On the edge

Git, commit, pull request, code review, coding agent

A brief history

Diff was originally the name of a Unix command created by Douglas McIlroy and James Hunt at Bell Labs; the program appeared in the fifth Unix release in 1974, and their paper describing the algorithm was published in 1976. The name is an abbreviation of the English word difference.

Where things stand

For decades, it has been a basic tool of software development, part of every version control system and code editor. By the end of 2026, due to coding agents, non-developers will also encounter it more frequently, because agents typically show suggested changes in diff format.

Status: 2026 November

In the news

Appears in 71 Agent Age stories; the curve shows weekly occurrence in the news magazine.

Also known as

diff · diffing · diff file · changelog · unified diff · git diff · code diff · file comparison

Sources

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.