Blog
-
Myers Diff Algorithm: How git diff Finds Changes
A developer-friendly explanation of the Myers diff algorithm — the O((n+m)d) approach that powers git diff, unified diffs, and most modern code review tools.
-
How Does diff Work? The Algorithm Behind File Comparison
The diff utility uses the Longest Common Subsequence algorithm to find the minimal set of changes between two files. Here's how it works, step by step.
-
git diff Explained: Every Common Usage with Examples
A practical reference for git diff — comparing working tree, staged changes, branches, commits, and specific files. Includes output format and useful flags.
-
Unified Diff Format: How to Read and Write Patch Files
The unified diff format (diff -u) explained: hunk headers, context lines, applying patches with the patch command, and common gotchas.
-
How to Compare Two Text Files in Linux
Compare two text files on Linux using diff, colordiff, vimdiff, and other tools. Covers common flags, output formats, and when to use each approach.
-
How to Compare Strings in Python
Python string comparison: equality, ordering, case-insensitive matching, fuzzy similarity, and difflib for line-by-line diffs. With examples.