Notes
Real problems and design decisions from this site and my other projects: what was happening, why, and the code that stayed.
- MePulse
50 prices a second, one render
MePulse gets a price for every coin each second. A buffer and a timer keep React from painting the screen fifty times in that second. - MeAtmos
11:00 in Tokyo is not 11:00 in your browser
new Date() reads a time without a zone as if it were yours. In a weather app that skews every city’s clock; the way out is to treat it as UTC. - miguesco.dev
Why Google would not show my site's favicon
The icon looked fine in the browser, but Google drew a generic globe. The cause: a size rule almost nobody mentions. - MePulse
How to split a rectangle between 50 coins
The MePulse heatmap uses a squarified treemap: an algorithm from 2000 that fits in one file and keeps every tile readable. - MeAtmos
Rain that falls the way the wind blows
The sky in MeAtmos is drawn on canvas from the real data: how much rain, which way it slants and when to stop animating. - miguesco.dev
A CSP without unsafe-inline, and what it broke in production
A strict security policy that worked perfectly on my machine and, in production, blocked a script I had never added. - MePulse
A rate-limited API with a cache in front of it
CoinGecko limits calls on its free plan. With one Vercel function and two cache directives, a burst of visitors costs a single call. - miguesco.dev
The language switch that sent me to the footer
I switched language from the very top of the page and landed in the footer. The bug was trusting the URL, and my own test was hiding another.