Blog
Posts on software development, careers, and craft.
I work with dozens of teams every year
I work with dozens of teams every year. The goal? Accelerate development. Things I look for: ✅ Are endpoints mocked? ✅ Do test personas exist? ✅ Do...
Pairing vs code reviews is often debated
Pairing vs code reviews is often debated. It’s a tradeoff. Pair programming: ✅ Produces higher quality code ✅ Grows new devs faster ✅ Avoids rework...
Just learned CSS has 5 "Layout modes": 1
Just learned CSS has 5 "Layout modes": 1. Flexbox 2. Positioned (eg. position: absolute) 3. Grid 4. Table 5. Flow Some CSS properties work differen...
20 reasons to consider @nextjs over create-react-app: 1
20 reasons to consider @nextjs over create-react-app: 1. Faster startup (compiles pages on-the-fly) 2. Faster builds (uses swc) 3. Static generatio...
3 ways to scale a frontend across teams: 1
3 ways to scale a frontend across teams: 1. Micro-frontend - Each team owns a vertical slice 2. Separate apps - Each team owns separate pages on di...
My take on micro-frontends: I think it’s important to standardize on one UI...
My take on micro-frontends: I think it’s important to standardize on one UI tech to deliver optimal UX. Why? Using a single UI tech to build the en...
5 reasons reusable components are harder to write than app code: 1
5 reasons reusable components are harder to write than app code: 1. We have to carefully document each setting so reuse scenarios are clear 2. The...
Using Storybook
Using Storybook? Me too. But, I just tried out Ladle. It's basically Storybook, but MUCH faster. Ladle uses esbuild and Vite behind the scenes for...
Component design trick: When creating a component, I try to design the...
Component design trick: When creating a component, I try to design the public API before writing code. I ask “What is the most desirable code for c...
An untrusted developer is a net loss
An untrusted developer is a net loss. The impact: Each line must be carefully reviewed in hopes of catching all the mistakes. We can’t assume anyth...
Stop disabling copy/paste
Hey developers, please stop disabling copy/paste in form fields! 🚨 It’s awful UX. It’s confusing. It doesn’t improve security. It breaks password managers. It …
3 technologies that are “better” than React: 1
3 technologies that are “better” than React: 1. Preact 2. Svelte 3. Solidjs These options offer better performance, smaller bundles, and more elega...
For years, I’ve been creating custom mock APIs for each app
For years, I’ve been creating custom mock APIs for each app. So, here’s an exciting idea I’m implementing today: 1. Create a mock API server to moc...
Writing tests first (TDD) is a tradeoff
Writing tests first (TDD) is a tradeoff. Writing tests first: ✅Assures my code is testable ✅Assures each feature is covered ✅Avoids regressions dur...
VS Code tip: If you're on a project with a lot of files named index, you can...
VS Code tip: If you're on a project with a lot of files named index, you can show the folder's name in the tab. Change Workbench › Editor: Label Fo...
Why I avoid naming files "index": 1
Why I avoid naming files "index": 1. Many files called index.* makes my open tabs harder to scan for the right file. 2. I open files by name using...
A map object is often an elegant alternative to switch statements and...
A map object is often an elegant alternative to switch statements and if/else statements. A map object maps keys to values. The map's values can be...
Just used esbuild-runner to speed up an app’s npm scripts, written in TypeScript
Just used esbuild-runner to speed up an app’s npm scripts, written in TypeScript. esbuild-runner starts the app over twice as fast. Here’s the diff...
5 key developer skills: 1
5 key developer skills: 1. Decomposition: Break big problems down into small problems. 2. Grouping: Store related things together. 3. Naming: Descr...
Just learned about the void operator in #JavaScript
Just learned about the void operator in #JavaScript. Useful to say “return undefined, regardless of what this code does”. Example: return void res....
Just learned about Ky, an elegant alternative to fetch or Axios
Just learned about Ky, an elegant alternative to fetch or Axios. https://github.com/sindresorhus/ky Ky requires VERY little code to make HTTP calls...
Which initialization pattern do you typically prefer
Which initialization pattern do you typically prefer? Option 1: Initialize as null Option 2: Initialize as empty object Why?
I don't generate mock data
I don't generate mock data. I create it by hand, strategically. I store it in static files. It covers our edge cases. When I find a bug, I: 1. Augm...
Habit: When declaring REST API response types via #TypeScript, I only...
Habit: When declaring REST API response types via #TypeScript, I only declare properties for the fields we use. Benefits: 1. The type is simpler. 2...
I often implement React components via 6 files: 1
I often implement React components via 6 files: 1. Button.tsx - component 2. Button.types.ts - TS types 3. Button.test.ts - Jest + testing-library...
In theory, it would be nice to write JavaScript web apps that don't need to...
In theory, it would be nice to write JavaScript web apps that don't need to be compiled. It's possible today. But there are multiple reasons I keep...
Here's an interesting browser state solution: A database, written in JS,...
Here's an interesting browser state solution: A database, written in JS, called TinyBase. Tables, rows, cells, indexes, relationships, undo, and mo...
8 ways to potentially speed up JavaScript project builds: Build tools: 1
8 ways to potentially speed up JavaScript project builds: Build tools: 1. swc 2. esbuild Fast, modern dev env: 3. Vite 4. Astro Monorepo tools: 5....
An interesting new collaborative software architecture: local-first...
An interesting new collaborative software architecture: local-first Traditional web apps think of the server as the primary system of record. local...
#TypeScript type narrowing: Use a truthy condition to remove null/undefined...
#TypeScript type narrowing: Use a truthy condition to remove null/undefined Use "typeof" to narrow a union of primitives Use "instanceof" to narrow...