Blog
Posts on software development, careers, and craft.
My rule for creating reusable components: Honor HTML
My rule for creating reusable components: Honor HTML. Example: A reusable Button should honor the native HTML button API. So, don’t do this: 🚫 <...
The most effective way to quickly learn a new tech: 1
The most effective way to quickly learn a new tech: 1. Open the docs. 2. Open an editor. 3. Build something.
People keep talking about shadcn/ui, so I just created some reusable React...
People keep talking about shadcn/ui, so I just created some reusable React components with it. My impressions: ✅ It’s fast to get started with Next...
Many companies create reusable components
Many companies create reusable components. But, the developers don't use them. Here's why: 🚫 "It’s bloated." 🚫 "I couldn’t find it." 🚫 "The API...
My mindset: “I should be able to merge my work daily.” This encourages me to...
My mindset: “I should be able to merge my work daily.” This encourages me to break tasks down. It encourages me to consider how I can “hide/disable...
Each year, I work with a few teams that are basically doing the same thing:...
Each year, I work with a few teams that are basically doing the same thing: Rewriting old web apps to use React. The old apps use ASP NET Web Forms...
Problem: You’re building a big feature that will require weeks of work
Problem: You’re building a big feature that will require weeks of work. Mistake: A long-lived feature branch. Solution: Use a feature flag to hide...
A pattern I've noticed: A designer ships great work, gets bored, and moves on
A pattern I've noticed: A designer ships great work, gets bored, and moves on. A new designer is hired, and immediately wants to do a redesign. Oft...
A messy coding environment is like a messy kitchen
A messy coding environment is like a messy kitchen. The mess makes it hard to do good work. Examples: 🚫 Unused files 🚫 Failing tests 🚫 Misspelle...
Global state isn’t “bad”
Global state isn’t “bad”. It’s a tradeoff. Advantages: ✅ Simple ✅ Convenient ✅ Easy to understand Downsides: 🚫 Prone to bugs 🚫 Can hurt performan...
Building a web app and need global state
Building a web app and need global state? You might not need a global state library. Consider using the browser’s global state: URL Cookie IndexDB...
Global variables in disguise: React Context Redux React-query Apollo Jotai...
Global variables in disguise: React Context Redux React-query Apollo Jotai Zustand That doesn’t mean these things are “bad”. But it does mean we sh...
Creating components is easy
Creating components is easy. Creating reusable components is hard. What mistakes did your company make when creating their own reusable UI components?
The most common mistake I see with feature flags is having too many
The most common mistake I see with feature flags is having too many. Flags are like tech debt. They’re useful, but they should typically be rare an...
Problem: “We can’t release daily
Problem: “We can’t release daily. The business decides when we can release new features.” Solution: Decouple release from deployment. Here’s how: 1...
Warning: If you hire people whose job is basically "lead meetings" you may...
Warning: If you hire people whose job is basically "lead meetings" you may find they waste a lot of people's time in needless meetings.
Want to do Continuous integration (CI) and Continuous Delivery (CD)
Want to do Continuous integration (CI) and Continuous Delivery (CD)? Then avoid creating a bunch of non-prod environments. Here's why: Non-prod env...
⚠️ Watch out: Environments encourage behaviors
⚠️ Watch out: Environments encourage behaviors. QA: "Let's batch up work and wait for a separate team to manually test our app and approve before w...
Problem: When a user shares or bookmarks a URL, the page doesn't show what...
Problem: When a user shares or bookmarks a URL, the page doesn't show what they were seeing when reloaded. Solution: Consider storing the state in...
Problem: You want to display a dialog
Problem: You want to display a dialog. Common solution: Use state to track the dialog's visibility. Alternative solution: Consider using a URL sear...
Things I rarely use: 🚫 Currying 🚫 Middleware 🚫 Inheritance 🚫...
Things I rarely use: 🚫 Currying 🚫 Middleware 🚫 Inheritance 🚫 Polymorphism 🚫 IoC containers 🚫 The actor model 🚫 Aspect-oriented programming �...
Some developers claim to be “over-employed” (working multiple full-time...
Some developers claim to be “over-employed” (working multiple full-time remote jobs). I've worked with a couple people who appeared to be trying it...
A common TypeScript mistake I see in React code reviews: Needless useState...
A common TypeScript mistake I see in React code reviews: Needless useState type arguments. If there's a default, the type can typically be inferred.
The most common way I see agile fail: 1
The most common way I see agile fail: 1. A team makes a mistake in production. 2. Executives create rigid, counter-productive processes because the...
Old habit: I added useful explanations in my GitHub pull requests to help...
Old habit: I added useful explanations in my GitHub pull requests to help the reviewer. But once the PR was merged, my comments were lost. 👎 New h...
Habit: I often centralize API urls in a single file
Habit: I often centralize API urls in a single file. Benefits: ✅ I reuse the URLs in fetch calls and mock configs (using tools like @ApiMocking) ✅...
9 ways to resolve "It works on my machine": 1
9 ways to resolve "It works on my machine": 1. Try incognito mode. 2. Use a different browser. 3. Is everything committed? 4. Did you change/add a...
Me: This PR fails on my machine
Me: This PR fails on my machine. Dev: It works on my machine. ¯\_(ツ)_/¯ Me: Add a test that runs the feature on CI. Dev: The new test passes on my...
Short-term thinking: We don't have time to write tests
Short-term thinking: We don't have time to write tests. Long-term thinking: Tests will save us time. With tests, we can: ✅ Understand how each feat...
Problem: I need to fix a bug
Problem: I need to fix a bug. But, the code is so hard to understand that I don't know how to fix it. Solution: 1. Understand what the feature is s...