Skip to content

Posts

JavaScript: Remove failed promises from a lookup cache

Share pending loads without permanently caching a transient failure.

Read more →

November 19, 2026

JavaScript: Preserve arrival order for numeric-looking labels

Use Map when numeric string labels must stay in their insertion order.

Read more →

November 19, 2026

JavaScript: Keep delimiter captures out of split results

Use a noncapturing regex group when split should return fields only.

Read more →

November 19, 2026

Go: Resolve relative URLs against the intended base path

See how a trailing slash changes URL resolution and why an absolute reference replaces the base.

Read more →

November 19, 2026

Go: Copy nested slices when cloning a map

Separate map entries and their mutable slice values before editing a copied configuration.

Read more →

November 19, 2026

Go: Account for partial delivery with io.MultiWriter

A failed MultiWriter write can leave earlier destinations updated and later ones untouched.

Read more →

November 19, 2026

Filter a shared list without skipping items or losing aliases

Build filtered contents before assigning them through a full slice when other references must keep observing the same list.

Read more →

November 19, 2026

Distinguish missing rows from None with zip_longest

Use a private object sentinel when aligning unequal iterables so padding cannot be confused with a real None value.

Read more →

November 19, 2026

Append a sidecar extension without replacing the original suffix

Build checksum sidecar names with with_name so data.csv becomes data.csv.sha256 instead of data.sha256.

Read more →

November 19, 2026

Reset StringIO without retaining an old report tail

Use seek and truncate together when reusing a StringIO buffer; moving the cursor and writing shorter text leaves old trailing content.

Read more →

November 19, 2026