The way we've done content caching using CDNs is changing, and it's not always intuitive. As a developer, you might have relied on the idea that using a popular CDN for libraries like jQuery would speed up your site because users already had the file cached. As we'll see, this is no longer the case. This post explain the old and new strategies for working with CDNs, how browser caching has changed, and what you should do to optimize your site in 2025 and beyond. Original CDN Caching In the old days browser caching was simple. The browser used a...
When researching CSS features that mimic SASS features I came accross the if function. This function allows you to apply conditional logic directly in your CSS, similar to how you might use it in SASS. This post will cover Chromium's implementations of the if function, which is currently behind a flag, and how it can be used to create dynamic styles based on conditions, along with fallbacks for browsers that don't support it yet. At the time of this post, this feature is only available in Chromium-based browsers Chrome, Edge, and Opera behind the Experimental Web Platform features flag. The...
In 2023, Chris Coyier wrote SASS features in CSShttps://chriscoyier.net/2023/07/11/sass-features-in-css/ where he explores the SASS features that have been adopted in CSS. It's been a couple years so, in this post, I will explore how have the features in Chris's article evolved and what additional features, originally in SASS, have been added to CSS. We'll also look at some of the SASS features that are still not in CSS. Some background SASS is a CSS preprocessor that extends the capabilities of CSS with features like variables, nesting, mixins, and more. It has been widely adopted in the web development community for...
As a way to learn React and exercise Typescript, I started building a recipe database application using PostgreSQL as the database, Express as the API server, and Vite/React as the client. This post will cover notes, observtions, design decisions and challenges I've faced while building the application. Why these tools? Before we start with specifics, let's talk about the tools I've chosen for this project: PostgreSQLhttps://www.postgresql.org/ is powerful, open-source, and has great support for JSON data types, which is useful for storing recipe data. I chose to use Prismahttps://www.prisma.io/ as the Object Relational Mappinghttps://www.freecodecamp.org/news/what-is-an-orm-the-meaning-of-object-relational-mapping-database-tools/ ORM because it provides a type-safe...
Temporal is a new API designed to handle dates and times in Javascript. It is designed as a replacement for the existing Date API, without taking over the Date namespace. Unfortunately, it is not yet available in all browsers, so we need to dynamically load it when it is not natively available. This post will explore how to dynamically load the Temporal API in a web application. It will also cover a subtlety in feature detection and how to use the temporal API once it's loaded. The problem I like the Temporal API better than the existing Date one so...
Homebrew is a powerful package manager for macOS that simplifies the installation and management of software. Migrating your Homebrew setup to a new Mac can be an easy process if you follow the right steps. This post will cover the steps to migrate your Homebrew setup from an old Mac to a new one, including how to create a Brewfile, and how to use it to restore your setup on the new machine. Migrating Homebrew to a New Mac: A Seamless Transition You can seamlessly transfer your entire Homebrew environment — from command-line utilities like git and node to GUI...
Managing monorepos, a single repository with multiple packages each with its own package.json and dependencies, can be challenging. This is where NPM workspaces come in. This post will cover what are NPM workspaces, how to use them, how they compare with Yarn and PNPM workspaces and how they interact with monorepo tools like Lerna and Nx. What are workspaces? NPM workspaces are a feature built into the npm CLI that allows you to manage multiple distinct packages from within a single, top-level root package. It's the native solution for creating a monorepo. You define a workspace by adding a workspaces...
I recently read two post that got me thinking about the value of learning a web development framework. These posts also align with my own experiences and thoughts on the subject. This post will explore my experiences, why I think learning a framework may be beneficial, and when do we learn to reach beyond frameworks and back to web standards. My Experience I've finally started to learn Reacthttps://react.dev/ and I can see the value in learning a framework but the value is tempered by the assumptions we all make when learning the framework. The Assumptions I see What do I...
One of my biggest frustrations in Node.js development is when your project works on your machine but breaks somewhere else. A common cause is package inconsistency between environments, even with a package.json file. Updating, removing, or installing packages can lead to a nodemodules directory that doesn't perfectly match what's defined. The standard fix — deleting nodemodules and package-lock.json before running npm install again — is cumbersome. This is the exact problem npm ci for clean install was designed to solve. This post will explain what npm ci is, how it differs from npm install, and how to use it effectively...
List comprehensions in Python allow you to create new lists by applying an expression to each item in an existing iterable, optionally filtering items based in a condition. I've always missed this feature in Javascript and later Typescript, but it wasn't until recently that I discovered there is a way to achieve similar array methods that are native to Javascript and available in Typescript. This post will explain list comprehensions in Python, and how they can be replicated in Typescript using the map and filter array methods. While there isn't a direct syntactic equivalent to Python's list comprehension in Typescript,...