Skip to main content
btheo.com btheo.com > press start to play
NEW POST: NODE.JS SECURITY 2025 OPEN FOR FREELANCE 10+ YEARS EXP REACT × NODE × AWS NEW POST: NODE.JS SECURITY 2025 OPEN FOR FREELANCE 10+ YEARS EXP REACT × NODE × AWS
▸ WORLD 4-1 :: SCRATCHPAD

NOTES.TXT

Half-thoughts, snippets, and stuff I keep re-googling. Updated whenever.
FILTER: 12 / 29 notes
GOTCHA 07 MAY 26

Every `any` Is a Bug Waiting

Treat every any in TypeScript like a TODO comment — note why it's there and come back to it.
TIL 29 APR 26

console.time Is the Fastest Profiler You Already Have

Before reaching for clinic.js or Chrome DevTools, wrap the suspect block with console.time.
TIL 15 APR 26

Ship Broken Over Ship Nothing

A 70% feature behind a flag teaches you more in one day of real feedback than a month of internal polish.
TIL 01 APR 26

JSON.parse Throws — Always Wrap It

JSON.parse on untrusted input without a try/catch is a crash waiting to happen.
TIL 18 MAR 26

The Event Loop Is Single-Threaded — Don't Block It

A synchronous loop over thousands of items will freeze every concurrent request in your Node.js server.
TIL 04 MAR 26

One Thing Per Commit

A commit that does three things is not a commit — it's a diff dump that makes bisect useless.
TIL 18 FEB 26

Profile Before You Optimize

You will almost never correctly guess where the bottleneck is without measuring first.
TIL 04 FEB 26

Type Your API Responses, Not Just Your Requests

Most TypeScript codebases validate inputs carefully then cast the API response as any — that's where production crashes live.
TIL 21 JAN 26

Promise.all Is Not Free

Concurrent database queries will hammer your connection pool faster than you think.
TIL 07 JAN 26

Validate Your .env at Startup

If a required env var is missing, crash immediately — don't let it fail silently at runtime.
TIL 30 MAR 25

Optimizing React Builds with Vite

Modern build strategies for React applications.
SNIPPET 28 MAR 25

Build Code That Fails Fast

Catch errors early to improve code reliability.
btheo@dev:~/notes$ tail -f thoughts.log