Mia's Code Journal

Thoughts on web development, design & life

Understanding the Event Loop in JavaScript

One of the most fundamental concepts in JavaScript is the event loop. Today I spent some time diving deeper into how microtasks and macrotasks are scheduled, and how promises interact with setTimeout. The key insight is that microtasks always run before the next macrotask, which explains a lot of the behavior I was seeing in my async code.

Why I Switched to CSS Grid for Layouts

After years of using Flexbox for almost everything, I finally made the switch to CSS Grid for page-level layouts. The two-dimensional control is so much more intuitive when you're dealing with complex page structures. Flexbox still has its place for one-dimensional component layouts, but Grid has become my default for anything beyond a simple row or column.

Setting Up a Minimal Dev Environment in 2026

I recently set up a fresh development environment and was pleasantly surprised by how streamlined things have become. VS Code with a handful of extensions, a good terminal emulator, and Node.js is really all you need to get started. I documented my setup process for anyone looking to keep things minimal and fast.

Book Review: Refactoring UI

Just finished reading Refactoring UI by Adam Wathan and Steve Schoger. As a developer who often struggles with design decisions, this book was incredibly practical. Instead of abstract design theory, it gives you concrete rules you can apply immediately. Highly recommended for any developer who wants to improve their design skills.