Skip to main content
Samrat Dutta Roy

Publication / Engineering Journal

Technical Writing & Notes

In-depth articles covering real-world frontend performance, state architecture, browser rendering, and production lessons learned.

·10 min read

From 3 Seconds to Instant: How URL-as-State Was Silently Killing Our Filter UX

Our product filter was taking 2-3 seconds to respond on every selection. The culprit wasn't a slow API or missing cache — it was using the URL as the sole source of truth. Here's how a hybrid Redux approach fixed it, what broke afterward, and what I'd do differently if rebuilding it today.

·8 min read

Why Did My Already-Loaded Component Show a Skeleton Again? React Suspense Bubbling Explained

I assumed once a React component loads, it stays loaded and you never see its skeleton again. A bug involving a modal and a misplaced Suspense boundary proved me wrong — and taught me how dynamic imports actually work under the hood.

·10 min read

Functions vs Classes in JavaScript: When to Use Which and Why It Actually Matters

Should you use functions or classes in JavaScript? Modern frameworks lean heavily on functions — React moved to hooks, Django started function-first. So why do classes still exist? The answer lies in memory, the prototype chain, and what your code actually needs to do.

·10 min read

What is UTF-8 Character Encoding? A Real Bug That Finally Made It Click

What is UTF-8 encoding and why does it matter? A real emoji bug in a CSV export — and two lines of code that fixed it — explains character encoding, Unicode, the Byte Order Mark, and why charset=utf-8 alone isn't always enough.

·10 min read

Is Node.js Single-Threaded? The Complete Answer Explained

Is Node.js single-threaded or multi-threaded? The real answer is both — and understanding why will change how you write backend code. A deep dive into the Event Loop, libuv thread pool, Worker Threads, and Cluster Module.