Xerobit

Guides · page 4 of 5

Browsing 107 guides, newest first.

Dev Productivity

Reading EXPLAIN ANALYZE in Postgres: Find the Slow Node in 5 Minutes

How to read Postgres EXPLAIN ANALYZE: an annotated real plan, scan types, estimated vs actual rows, loops, external merge sorts, nested loops, one fix timed, and N+1 detection.

10 min read
Dev Productivity

SQL NOT IN Returns No Rows: The NULL Trap and Three Fixes

Why NOT IN (subquery) returns zero rows when one value is NULL, shown on PostgreSQL 16 and SQLite, with three fixes and measured timings on 1M rows.

7 min read
Dev Productivity

Top N Per Group in SQL: ROW_NUMBER vs LATERAL vs DISTINCT ON

Top N rows per group in SQL: ROW_NUMBER with PARTITION BY, PostgreSQL DISTINCT ON and JOIN LATERAL, with timings on 1M rows, tie handling and an old MySQL fallback.

8 min read
Dev Productivity

How to Split a /16 VPC Into Subnets Across 3 Availability Zones

A worked VPC CIDR plan: carve 10.0.0.0/16 into public /24 and private /20 subnets for 3 AZs, with AWS's 5 reserved addresses, an overlap check and a /16 to /28 table.

7 min read
Frontend & Design

SVG Favicon: Modern Vector Favicons for Any Screen

SVG favicon with dark mode: copy-paste SVG and link markup with an ICO fallback, Chrome link order tested, caniuse support, a failure table and file sizes of SVG vs PNG vs ICO.

8 min read
Dev Productivity

git diff --patience vs --histogram vs Myers: Why the Same Change Looks Different

Swap two functions and git shows a different diff depending on the algorithm. Real hunks for myers, minimal, patience and histogram, when each wins, and how to set diff.algorithm.

6 min read
Dev Productivity

Bot and Crawler User Agent Strings: Googlebot, Bingbot, GPTBot, ClaudeBot

Googlebot, GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot and PerplexityBot user agent strings with vendor sources, robots.txt tokens, crawler verification and log recipes.

7 min read
Dev Productivity

Why Windows 11 Shows "Windows NT 10.0" in the User Agent (UA Reduction Explained)

Windows 11 reports Windows NT 10.0 in the user agent, and Chrome freezes macOS, Android and version fields. Real Chrome 156 strings and how to detect Windows 11 with client hints.

7 min read
Dev Productivity

WiFi QR Code Format: Exact WIFI: Payloads, Escaping and Scan Tests

The exact WiFi QR payload for WPA, WEP, open and hidden networks, the escaping rules for special characters, and a decode round trip of generated QR codes.

7 min read
Dev Productivity

Average Reading Speed in Words Per Minute: 238 wpm and the Study Behind It

Average adult silent reading speed is 238 wpm for non-fiction and 260 for fiction, 183 aloud. What the 2019 meta-analysis found, a reading time lookup table, and how to apply it.

6 min read
Data & Format

XPath Returns Nothing? Default XML Namespaces Explained

Why XPath finds nothing in an Atom feed: the default xmlns, with tested fixes in Python lxml, browser document.evaluate, C# XmlNamespaceManager and local-name(), plus XPath basics.

7 min read
Data & Format

XML to JSON: Why a Single Child Becomes an Object, Not an Array

One <item> converts to an object, two to an array. See it in four converters, how to force arrays, and what else XML to JSON loses: attributes, mixed content, order, numbers.

8 min read
Data & Format

Docker Compose YAML Anchors and x- Extension Fields (DRY Config)

Remove repeated Compose config with anchors, aliases, the << merge key and x- extension fields. Resolved output verified in js-yaml and PyYAML, plus the shallow-merge trap.

7 min read
Data & Format

Kubernetes YAML Errors: "cannot unmarshal string into Go struct field" and Fixes

Why kubectl apply fails with cannot unmarshal string into Go struct field, and the other common Kubernetes YAML errors: tabs, mapping values, bad env values, apiVersion, selector.

7 min read
Data & Format

YAML Schema Validation: Ajv, jsonschema and Editor Setup

Validate YAML with JSON Schema in Node (js-yaml + Ajv) and Python (PyYAML + jsonschema), with the real error messages, editor schema comments, and the Norway problem.

7 min read
Dev Productivity

Catastrophic Backtracking: Measured Regex Times, Safe Rewrites and Engine Differences

Real match times for ReDoS-prone regexes in V8, Python, .NET and RE2 on growing inputs, rewrites and atomic groups that fix them, and timeouts for Node and Python. Tested.

9 min read
Dev Productivity

Character Limits Cheatsheet: Sourced Limits and How to Count Characters Correctly

Dated, sourced limits for X posts, SMS, YouTube, Postgres and HTTP headers, plus the family emoji that is 1 grapheme, 7 code points, 11 UTF-16 units and 25 bytes.

8 min read
Data & Format

Comparing JSON Structurally: What Counts as Equal (Tested in JS and Python)

Key order, 1 vs 1.0, null vs missing, array order and big integers decide whether two JSON documents are 'equal'. Tested results for JS, Python and the Xerobit diff tool.

7 min read
Dev Productivity

Cron and Daylight Saving Time: Skipped and Double Runs

What a 02:30 or 01:30 cron job does on DST change days in cron, systemd and cron libraries (tested), why CRON_TZ may be ignored, and how to make double runs harmless.

7 min read
Data & Format

CSV Quoting and Escaping Rules: RFC 4180 vs What Parsers Really Do

A test corpus of 11 tricky CSV inputs run through Python csv, pandas, Papa Parse and the Xerobit tools, showing where parsers agree with RFC 4180 and where they diverge.

8 min read
Dev Productivity

OKLCH vs HSL for Color Scales: Why HSL Lightness Is Uneven

HSL lightness 50% is not equal brightness: yellow and blue differ 8x in contrast. Measured tables, 9-step scales in HSL and OKLCH, @supports fallback, #10B981 in 4 formats.

8 min read
Dev Productivity

Why git diff Shows the Wrong Lines: Myers vs Patience vs Histogram

Git's default Myers diff can show a moved function as one rewritten into another. A reproducible file pair, the histogram fix, zdiff3 conflicts and CRLF noise on Git 2.53.

9 min read
Dev Productivity

QR Code Not Scanning? Size, Quiet Zone, Contrast and Error Correction Fixes

Why a QR code will not scan and how to fix it: a symptom table and measured limits for quiet zone, contrast, pixels per module, logo overlay per error level and URL length.

9 min read
Encoding & Crypto

Password Cracking Time Table by Length and Hash: MD5, NTLM, bcrypt

Brute-force crack times for passwords of 6 to 16 characters against MD5, NTLM and bcrypt, computed from a published hashcat RTX 4090 benchmark, with assumptions stated.

7 min read