Blog
Posts on software development, careers, and craft.
Coding is writing
Coding is writing. In writing, these things matter: ✅Clarity ✅Brevity ✅Spelling ✅Formatting ✅Punctuation ✅Terminology ✅Consistency ✅Grouping relate...
Problem: We need to rename a DB column, but we want to avoid a breaking change
Problem: We need to rename a DB column, but we want to avoid a breaking change. Solution: 1. Add new column (Ticket 1) 2. Update all code to refere...
Problem: End-to-end tests are often slow and brittle
Problem: End-to-end tests are often slow and brittle. Solution: Test the UI and the backend separately, and use contract tests to assure our mocks...
Simple rule: The more effort I put in, the more results I get out
Simple rule: The more effort I put in, the more results I get out. Examples: The more I exercise, the better my results. The more I invest in my ca...
Making fundamental changes on a development team is hard
Making fundamental changes on a development team is hard. How do we start testing? How do we start using types? How do we change technologies? My a...
Quick story about my lucky Thanksgiving this year
Quick story about my lucky Thanksgiving this year. Thanksgiving day, my family and I take a boat ride to an uninhabited island one hour east of Pue...
I love the simplicity of React's reuse model
I love the simplicity of React's reuse model. Repeating JSX? Create a component. Repeating logic? Create a hook. I can compose these simple buildin...
Confession: I’ve been writing software for over 20 years, but I often learn...
Confession: I’ve been writing software for over 20 years, but I often learn things I feel like I should have stumbled across years ago. 🚫 I spent...
Problem: You want to create a reusable React dialog that manages its own...
Problem: You want to create a reusable React dialog that manages its own visibility. Solution: Create a DialogButton component that controls the di...
Problem: If a user experiences a client-side JavaScript error, does your...
Problem: If a user experiences a client-side JavaScript error, does your team know? Solution: Use a client-side error tracking service. (I use Trac...
Why I don’t do TDD often: TDD commits me to an API before I know what API I want
Why I don’t do TDD often: TDD commits me to an API before I know what API I want. At first, I’m just iterating. Once I like the API, I add tests.
In a code review, what's an example of a "nitpick"
In a code review, what's an example of a "nitpick"? I struggle to think of an example because most the "nitpick" level stuff is already checked via...
A minor tweak I enjoy: I put the scripts section near the top of package.json
A minor tweak I enjoy: I put the scripts section near the top of package.json. Why? Because it’s the thing I tend to read, change, and reference th...
Downward spiral: 1
Downward spiral: 1. Releases often fail because the team doesn’t have automated tests and deployments, weak code reviews, poor communication, and o...
I've worked with teams that were scarred by their previous automated testing...
I've worked with teams that were scarred by their previous automated testing experience. "Tests were a hinderance. We wasted lots of time on slow,...
I’ve found React.memo usage should be rare
I’ve found React.memo usage should be rare. If it’s common, I ask: 1. Is state is too high? 2. Are components properly decomposed? Could we move st...
Problem: If your React app uses providers, you may have to repeat their...
Problem: If your React app uses providers, you may have to repeat their config in multiple spots: 1. The app's root 2. Storybook 3. Tests Solution:...
How I use React query: 1
How I use React query: 1. Create custom hooks that wrap related useQuery and useMutation calls. 2. Inline queryFn and mutationFn args. This enforce...
I've finally realized why it's hard for me to get into watching pro sports:...
I've finally realized why it's hard for me to get into watching pro sports: It feels like I'm watching other people live their life. I'd rather be...
I often group related props into an object
I often group related props into an object. Advantages: ✅ Less code, so easier to read ✅ Clarifies the relationship between related fields ✅ Makes...
GitHub CoPilot saves expensive developer time by purchasing cheap AI time
GitHub CoPilot saves expensive developer time by purchasing cheap AI time. So, if a company won't pay for GitHub CoPilot, they either don't realize...
“I don’t have time to exercise” is counter-productive
“I don’t have time to exercise” is counter-productive. Exercise is fuel for motivation and focus. So, exercise improves my per hour output. My rule...
When working in @tan_stack React query, I use setQueryData instead of...
When working in @tan_stack React query, I use setQueryData instead of invalidateQueries when possible. Here's why: setQueryData instantly updates t...
React in 2023 is like the Honda Accord
React in 2023 is like the Honda Accord. ✅ Proven. ✅ Popular. ✅ Flexible. ✅ Reliable. ✅ Well documented. ✅ Easy to find related components. ✅ Easy t...
This talk is excellent
This talk is excellent. A nice history lesson on why static typing had a comeback and is likely to be the most popular paradigm for the future. “Wh...
Tests are useful, but they’re not automatically a win
Tests are useful, but they’re not automatically a win. 🚫 Poorly-written, slow, flakey tests hinder development and waste time. ✅ Well-written, fas...
3 parties that should have design input: 1
3 parties that should have design input: 1. The designer (assures the design is usable, consistent, aesthetically pleasing, etc) 2. The product own...
Here’s why React Server Components (RSC) are a big performance win: 1
Here’s why React Server Components (RSC) are a big performance win: 1. RSC starts fetching sooner - the moment the request is received. Client comp...
Why I'm excited about React Server Components (RSC): 1
Why I'm excited about React Server Components (RSC): 1. Smaller JS bundle (Server components add zero K to the bundle) 2. Performance. Fetching sta...
The key difference between @nextjs and @remix_run: Next is a React framework
The key difference between @nextjs and @remix_run: Next is a React framework. Remix is a framework that happens to use React. Next embraces React f...