Blog
Posts on software development, careers, and craft.
People complain about complex TypeScript types, but complex types are...
People complain about complex TypeScript types, but complex types are typically only necessary for libraries, not apps. Types for apps should typic...
Everybody dreams of retiring early
Everybody dreams of retiring early. But it’s a mirage. Not because it’s impossible. Because it’s not as desirable as it sounds. Unlimited free time...
Problem: When the left and right side match, a TypeScript enum or const...
Problem: When the left and right side match, a TypeScript enum or const object is needlessly verbose. Solution: Use a union.
I ❤️ TypeScript
I ❤️ TypeScript. But it contains 4 features that I avoid: 1. The "private" and "protected" keywords on classes. Largely redundant since JS has nati...
Just talked to a business owner who reduced his dev staff from 18 to 3 using...
Just talked to a business owner who reduced his dev staff from 18 to 3 using generative AI. Claims he's getting the same velocity with only 3 devs....
Problem: I may forget to pass an optional param in cases where it should be...
Problem: I may forget to pass an optional param in cases where it should be provided. Solution: Require the parameter, but also accept undefined. T...
One of the weirdest JavaScript features: Functions can have properties
One of the weirdest JavaScript features: Functions can have properties. Why? Because JavaScript functions are objects. So, this is valid JS.
In one of my client’s apps, we centralized date formats in an enum to...
In one of my client’s apps, we centralized date formats in an enum to encourage consistency. But over time, we ended up with this huge list! That s...
Interesting
Interesting. Years ago, Jared Palmer created Formik, one of React’s most popular form libraries. Fast forward to today, and Jared is VP of AI at Ve...
In TypeScript, many people argue over when to use type vs interface
In TypeScript, many people argue over when to use type vs interface. My rule? Use type when necessary. Here are 5 things only type can do. Otherwis...
I recently joined a team that’s using V0 for rapid UI prototyping
I recently joined a team that’s using V0 for rapid UI prototyping. We’re not using Figma - V0 *is* the requirements. Here’s the process: 1. A non-t...
Why does coding pay well
Why does coding pay well? 4 reasons: 1. Keeping up with the syntax, patterns, best-practices, and tools is hard work. Many can’t do it, or aren’t w...
V0's system prompt specifies these naming and casing rules
V0's system prompt specifies these naming and casing rules. I agree with all this. For years, I used PascalCase for React components. But I now I u...
In modern TypeScript, there are at least a dozen ways to narrow types
In modern TypeScript, there are at least a dozen ways to narrow types. 1. typeof Type guards 2. Truthiness narrowing 3. Equality narrowing 4. `in`...
Next.js and React Router 7 (RR7) have fundamentally different approaches to...
Next.js and React Router 7 (RR7) have fundamentally different approaches to decomposition. In Next.js, you create many small files per route (Page....
What if I take my career seriously and AI replaces me
What if I take my career seriously and AI replaces me? What if I don’t take my career seriously and a human replaces me? Thus, there are really jus...
In my experience, it’s rare to find someone in QA who is as good at writing...
In my experience, it’s rare to find someone in QA who is as good at writing automated tests as a developer. My theory on why: If you’re good at wri...
Claim: Your app is slow because it uses React/Vue/Angular instead of plain...
Claim: Your app is slow because it uses React/Vue/Angular instead of plain HTML and Vanilla JS. Reality: It’s probably slow because of two things:...
Woah, I agree with v0’s state management preferences
Woah, I agree with v0’s state management preferences. This is from V0’s system prompt: PREFER: - React's built-in useState/useReducer - Server Comp...
What I love about Tanstack start: Simplicity
What I love about Tanstack start: Simplicity. Competitors have larger, more confusing APIs because they have to support previous “mistakes”. Tansta...
Problem: You want to push your changes, but skip CI because you're not done...
Problem: You want to push your changes, but skip CI because you're not done yet, so running CI would be wasteful. Solution: Put this in the push co...
Controversial opinion: 🌶️ I prefer for all quality checks to occur *before*...
Controversial opinion: 🌶️ I prefer for all quality checks to occur *before* merge. Here's why. Merging code that hasn't been fully quality checked...
My preferred development workflow for 2024: 1
My preferred development workflow for 2024: 1. All devs have their own DB instance so we don’t conflict with each other. The DBs run locally, and c...
Yesterday read through V0's 1600+ line system prompt
Yesterday read through V0's 1600+ line system prompt. It specifies that V0 should follow these best practices. This is a good general code review c...
Someone posted the V0 system prompt on GitHub
Someone posted the V0 system prompt on GitHub. This is fascinating reading. And as a V0 user, it helps me understand how to effectively interact wi...
Wow, Supabase is 🔥
Wow, Supabase is 🔥. So far I'm enjoying: Edge functions Built-in user auth Solid docs and SDKs Granular row level security Web-based DB Admin inte...
Yep
Yep. A staging environment is an architectural code smell. Prefer continuous deploy and feature flags if possible. https://t.co/uN7kjpSe5A
Hot take 🌶️: I’m not a fan of dedicated QA
Hot take 🌶️: I’m not a fan of dedicated QA. I prefer the dev team to be solely responsible for quality. When dedicated QA exists, 2 problems tend...
I’ve found the fewer environments a software team has the better
I’ve found the fewer environments a software team has the better. Every additional environment adds cost, management overhead, out of sync risk, an...
I'm creating a new TypeScript project using Bun
I'm creating a new TypeScript project using Bun. Loving it so far. Lightning fast and easy to use. Look how little code I need to create a REST API...