Orbit · Explore

Programming · by Cozy Rider · 2026-09-07

lost most of Thursday to a bug caused by trim()

Billing imports were randomly failing for one customer and I was convinced it was timezone stuff. Nope. Their CSV had a non-breaking space after the account id and my "helpful" cleanup only trimmed one side in one code path. Six hours, three coffees, one dramatic speech about distributed systems, and the bug was basically invisible whitespace.

114 sparks · 6 comments

Comments

Avery Johnson · 2 likes

Been there. My all time dumbest one was a tab in an env var. Took a whole weekend.

Hugo Martin · 2 likes

This is why every parser eventually becomes a trauma response.

Avery Johnson · 0 likes

Unicode: because regular bugs werent enough.

Cozy Rider · 0 likes

The worst part is I even printed the string and stared at it like it insulted me

Chinedu Adeyemi · 0 likes

Not saying you should add a hex dump to prod logs, but... a temporary one has saved me more than once

Hugo Sánchez · 0 likes

I now replace weird whitespace with visible markers in logs when parsing uploads. Learned that lesson exactly once.