Words, precision
and power.
The details behind text processing, encoding, and document formats.
✦ AI-powered — understands natural language
Why Your Reading Time Estimate Is Wrong — Reading Speed Research, Word Count Inconsistency, and Character Limits That Actually Matter
Why Text Diff Tools Work at Line Level (Not Character Level): Edit Distance, Granularity, and the Unified Diff Format
The simplest possible text diff — "what characters changed?" — is the Edit Distance problem, with an O(n×m) solution too slow for document-scale text. This is why practical diff tools work at line level, with a second character-level pass only within changed lines. Here's how granularity (character, word, line, sentence, structural) changes both what's shown and what's computationally feasible, the unified diff format explained, and why structured diffs for JSON/HTML need tree-level comparison rather than line-level.
Huffman Coding: How "E Is the Most Common Letter" Becomes Smaller ZIP Files and PNG Images
Every ZIP file, PNG image, and gzip-compressed page relies on the same observation as the previous article's frequency analysis: characters aren't equally frequent, so assigning shorter codes to common symbols and longer codes to rare ones saves space. Here's how Huffman coding builds optimal variable-length codes from frequency data, why "prefix-free" codes need no separators, how this fits into larger compression pipelines like DEFLATE, and why already-compressed data resists further compression.
Frequency Analysis: How Counting Letters Breaks Caesar Ciphers, Substitution Ciphers, and Why Modern Encryption Is Immune
A Caesar cipher can be broken in seconds — not by trying all 25 shifts, but by counting which ciphertext letter appears most often and matching it against English's most common letter, "E." Here's how frequency analysis breaks substitution ciphers, why polyalphabetic ciphers like Vigenère were designed to defeat it, and why modern encryption (AES, RSA) is immune to this entire category of attack.
Find & Replace Beyond Basics: Regex Capture Groups, Multi-Cursor Editing, and Safe Project-Wide Replace
Find-and-replace with regex capture groups doesn't just substitute text — it can restructure it, swapping argument order or reformatting dates by reusing captured values in the replacement. Here's how capture-group replacements work, when multi-cursor editing is the better tool instead, case-modification syntax for naming-convention conversions, and safe practices for project-wide replace operations.
Reversing Text Has Three Completely Different Meanings — Here's How Each Works and When You'd Use It
Reversing text has three completely different interpretations: reverse every character, reverse word order, or reverse line order — and each produces different output from identical input. Here's where each is actually used (character reversal for palindromes, line reversal for the Unix tac command and log files), the palindrome variants that require different reversal types, and why reversing Arabic/Hebrew code points is different from displaying them right-to-left.
Why ROT13's Encode Button and Decode Button Do the Same Thing — and Why That's the Point
ROT13 shifts each letter by 13, and shifting by 13 again returns you to the start — because 13 is exactly half of 26, and the English alphabet has 26 letters. This self-inverse property means "encode" and "decode" are literally the same operation, which is exactly why ROT13 became the standard for Usenet spoilers and forum answers: one button, symmetric, no separate decode tool needed. Here's the math, the variants (ROT5, ROT18, ROT47), and where self-inverse operations appear elsewhere.
Alphabetical Sort Order Isn't Universal: Locale Collation, Swedish Å, and Why Your Database Might Be Sorting Wrong
Alphabetical sort order isn't the same in every language — Swedish Å, Ä, Ö go at the end of the alphabet; German has two competing sort conventions for umlauts; Spanish ñ sits between n and o. Most sort tools and database defaults use Unicode code-point order, which is correct for English and wrong for nearly every other language. Here's what locale-sensitive collation actually is, how to configure it in SQL, JavaScript, and Python, and the case/accent-sensitivity dimensions on top of letter ordering.
Trailing Whitespace and Git Diff Noise: Why a One-Line Fix Can Show 200 Lines Changed
A one-line bug fix can show up as a 200-line diff if an editor's "trim trailing whitespace on save" setting touches every line in a file that previously had inconsistent trailing whitespace. Here's why this happens, git's whitespace-ignoring diff flags, dedicated "cleanup commit" practices for git blame hygiene, and the Markdown exception where trailing whitespace is actually meaningful.
How Plagiarism Detection Actually Works: From Exact-Match Shingling to Semantic Similarity, and Why Each Has Limits
Plagiarism-detection software doesn't search for "stolen sentences" — it converts text into mathematical representations (shingles, vectors, embeddings) and measures distance between them. Here's how exact-match shingling catches copy-paste-with-edits but misses paraphrasing, why semantic-embedding similarity catches paraphrasing but can't distinguish "copied" from "independently expressed similarly," and why similarity scores require human judgment to interpret.
What Actually Happens When You Repeat a String 1,000,000 Times — and Which Operations Become Catastrophically Slow
Repeating "abc" 1,000 times is a one-character operation in Python — but what you do with the result matters enormously. String concatenation in a loop with a large repeated string is O(n²); using join() is O(n); at scale, the difference is seconds vs hours. Here's what repetition actually creates in memory, which operations scale linearly vs quadratically on large strings, how JavaScript's "string ropes" differ from Python's contiguous buffers, and when virtual repetition (storing pattern + count) is better than materializing the full string.
Why "JohnSmith" and "johnsmith" Are the Same Account Here But Different Accounts There: Case Sensitivity in Login Systems
"JohnSmith" and "johnsmith" might be the same account on one platform and two different accounts on another — usernames, emails, and passwords each have different case-sensitivity conventions, and none of them are universal. Here's why email local-parts are technically case-sensitive but practically never are, why username case-sensitivity varies by platform and creates genuinely hard migration problems if changed later, why passwords must remain case-sensitive for security, and why mobile autocapitalize causes invisible login failures.
Why Layouts Approved with Lorem Ipsum Break When Real Content Goes In: The Length Mismatch Problem
A mockup gets filled with Lorem Ipsum, approved, and the real copy — 40% longer — breaks the layout in ways nobody saw during approval. The mismatch happens because placeholder text length is arbitrary (chosen to "look right") while real content length is determined by what needs to be said. Here's why headlines are the most commonly mismatched element, the "greek text vs realistic text" spectrum, and why testing multiple placeholder lengths (not just one) matters for layouts that are close to final.