Blog

Writing about developer

Twelve write-ups on the formats that get pasted between tools all day: what base64 is for and what it costs, why YAML indentation bites, what is actually inside a JWT, when a v7 UUID beats a v4, and why a timestamp lands an hour off.

Developer

Why Your JSON Fails to Parse: the Usual Five

The parser tells you where it gave up, not where you went wrong. Five mistakes, the message each one produces, and a way to cut a stubborn file in half.

Read
Developer

What the = at the End of Base64 Means

The equals signs are bookkeeping for a last group that came up short. When they can go, and what a string’s length tells you before you decode it.

Read
Developer

The Regex Mistakes That Waste an Afternoon

Three regex mistakes return something that looks almost right, which is why they cost hours instead of minutes. How to recognise each one in a minute.

Read
Developer

A Timezone Is Not an Offset

An offset is one number for one instant. A timezone is a set of rules that produces that number. Why the difference decides what you should store.

Read
Developer

Why Putting a UUID in a URL Is a Tradeoff

A random identifier hides how many records you have and stops people counting their way through them. It also makes every URL unreadable and unsayable, and it is not access control.

Read
Developer

What Base32 Is and Where You Have Seen It

Five bits per character, a shrunken alphabet, and the reason your two-factor secret looks nothing like a JWT.

Read
Developer

What a UTM Parameter Actually Does

A UTM tag rides in the query string and nothing reads it on the way. Only the analytics script on the page it lands on ever looks at it.

Read
Developer

Why JSON Has No Comments

Douglas Crockford took them out on purpose, and the workaround split into two dialects with the same idea and different names.

Read
Developer

YAML vs JSON: Which to Use, and Where Each Bites

JSON for what machines exchange, YAML for what people edit. The interesting part is the indentation, the type coercion and the country code that turns into false.

Read
Developer

Should You Use Base64 Images? When Inlining Helps

Inlining saves one request and costs you 33% more bytes, separate caching and lazy loading. The line sits at about a kilobyte.

Read
Developer

What Is Inside a JWT (and What It Does Not Prove)

Three base64url chunks, a handful of claims, and one signature that proves far less than most people assume.

Read
Developer

What Is Base64 and When You Actually Need It

Base64 turns bytes into 64 safe text characters, three at a time, and charges you a third of the file size for the privilege.

Read
Developer

What a Unix Timestamp Is and How to Read One

One number, counting seconds since 1970. How to read it at a glance, and why yours keeps landing in January 1970.

Read
Developer

UUID v4 vs v7: Which One to Use and When

v7 for database keys, v4 when the creation time is nobody else’s business. The bits behind that rule, and the two places v7 does nothing at all.

Read
Developer

What URL Encoding Is, and Why Your Link Breaks

Percent-encoding in plain terms: which characters need escaping, which never do, and the three ways it goes wrong.

Read
Developer

HTML Entities: What They Are and When You Need Them

An entity is a character written in plain ASCII. You need five of them, and the rest you can type straight into the file.

Read
Developer

How to Format Minified JSON So You Can Read It

Re-indenting one enormous line is the easy part. The round trip through the parser is where things change without telling you.

Read
Developer

How to Convert JSON to CSV and What It Loses

Every key becomes a column and every object becomes a row. The decisions start the moment something in your JSON is not flat.

Read
Developer

How to Convert CSV to JSON (and What Breaks)

Rows become objects and headers become keys. The interesting part is the leading zeros, the stray quote and the nesting you cannot get back.

Read
Developer

Binary vs Hex vs Decimal: The Difference Explained

The base only decides how a quantity is spelled. Which one to use depends on whether a human or a circuit is reading it.

Read

Where to start

If you only read two, make them what base64 is and what a Unix timestamp is. Both are things most developers use for years with a working but incomplete picture, and both produce bugs that are hard to spot precisely because the code looks right.

What is inside a JWT is the third, and it is the one with security consequences if the picture is wrong.

What these pieces have in common

These are mostly about formats, and a format is a set of decisions someone made long ago that you now have to live with. Why JSON has no comments is a design choice with a stated reason. UUID v4 against v7 is about a tradeoff between randomness and index locality that did not matter until databases got large. YAML against JSON is about readability bought with ambiguity.

The rest are the encodings that quietly sit between systems. URL encoding, HTML entities, base32 and number bases all solve the same shape of problem: getting data through a channel that reserves some characters for its own purposes.

Frequently asked questions

Why does JSON not allow comments?

Its designer removed them deliberately. Comments had been used to carry parsing directives in other formats, which turned a data format into something each parser interpreted differently. Leaving them out keeps JSON unambiguous. The common workaround is an ordinary key that readers ignore, such as a field named for a note.

Should I use UUID v4 or v7?

Use v7 when the UUID is a database primary key. It begins with a timestamp, so new rows land next to each other in the index rather than scattered through it, which keeps inserts fast as the table grows. Use v4 when you want no information revealed by the identifier at all.

What is the difference between base64 and base32?

Both represent binary data as text, with different alphabets. Base64 uses 64 characters including ones easily confused when read aloud or typed, and is more compact. Base32 uses 32 unambiguous characters, is about twenty percent larger, and is what two-factor setup keys use because people have to type them.

All categories

PDF 10Images 10Text 14Design 11Security 8Calculators 13Everyday 4Time 7