Blog

Posts on software development, careers, and craft.

Voluntary discomfort avoids involuntary discomfort

Voluntary discomfort avoids involuntary discomfort. Exercise and eating healthy avoids health problems Learning new skills avoids being stuck in yo...

Here's a simple practice for maintainable code

Here's a simple practice for maintainable code. Separate these three activities: 1. Get data 2. Reformat data 3. Display data Code that separates t...

To foster automated testing: 1 Setup test framework 2 Write a few tests 3...

To foster automated testing: 1 Setup test framework 2 Write a few tests 3 Setup a CI server to run the tests on every pull request. 4 Integrate pul...

Redux and context are like pain medicine

Redux and context are like pain medicine. They reduce the pain of managing state and actions used by many components. But global data has downsides...

A benefit to having an expert on the team: They've already made *many* mistakes

A benefit to having an expert on the team: They've already made *many* mistakes. So an expert can often say "I'd avoid x because... But I've found...

Recipe for going nowhere for a decade: 1

Recipe for going nowhere for a decade: 1. Don’t travel 2. Don’t read 3. Spend all free time on entertainment 4. Do the same job 5. Eat the same stu...

GraphQL isn’t suddenly popular because it can do things REST can’t do

GraphQL isn’t suddenly popular because it can do things REST can’t do. REST isn’t a spec. So “REST” can theoretically do anything. GraphQL is popul...

Sad to hear of Joe Armstrong's passing.😔 My fav quote of his: "The problem...

Sad to hear of Joe Armstrong's passing.😔 My fav quote of his: "The problem with object-oriented languages is they’ve got all this implicit environ...

"Premature optimization is the root of all evil" - Donald Knuth Why

"Premature optimization is the root of all evil" - Donald Knuth Why? Because perf optimizations typically require more code, more complexity, and t...

Just spent months building a high performance UI in React

Just spent months building a high performance UI in React. Instantly responsive against a mock API. Even with Chrome performance at 4x slowdown and...

Things I think about during a code review: Is the intent clear

Things I think about during a code review: Is the intent clear? Is there needless duplication? Could existing code have solved this? Is this an ato...

What I love about working remote: You can work where you feel most inspired

What I love about working remote: You can work where you feel most inspired. Got up early and biked to the lake. 70 degrees and sunny. 😍

Ooo, I like this pattern from @kentcdodds for minimizing boilerplate in...

Ooo, I like this pattern from @kentcdodds for minimizing boilerplate in React tests. Note how the helpers in the renderLoginForm function make the...

I have days where I say “I don’t have time for the gym.” Yet I spend an hour...

I have days where I say “I don’t have time for the gym.” Yet I spend an hour on Twitter that day. That’s not a lack of time. That’s a failure of pr...

Habit that has radically improved my life over the last 5 years: Listening...

Habit that has radically improved my life over the last 5 years: Listening to audiobooks instead of the radio. In just the last year, I’ve “read” 2...

Just used react-window to handle a table of 1000 records

Just used react-window to handle a table of 1000 records. Loads nearly instantly, feels natural when scrolling, and re-renders a subset of rows imm...

Unpopular opinion: The team lead should approve all code reviews

Unpopular opinion: The team lead should approve all code reviews. Without a clear person with skin in the game, code quality tends to atrophy. Why?...

When a team regularly responds to code reviews with “Looks good to me”, I...

When a team regularly responds to code reviews with “Looks good to me”, I get concerned. A code review with no questions, comments, issues, or sugg...

Just finished “The Simple Path to Wealth”

Just finished “The Simple Path to Wealth”. Superb. 1. Live WAY below your means 2. Invest savings in low cost index funds (VTSAX) 3. When your inve...

Woah, this is elegant JavaScript

Woah, this is elegant JavaScript. Need to conditionally add a property to an object? Here's a slick approach. The right-hand side is only applied i...

TIL about console.dir

TIL about console.dir. It writes all the properties of a JavaScript object to the console. Closures are even labeled! See highlighted text in the a...

When creating reusable components, it's useful to have a checklist of states...

When creating reusable components, it's useful to have a checklist of states to consider. It's easy to forget some of these: - Loading - Loading ti...

I'm ashamed to say I used to assume consumption was a sign of wealth

I'm ashamed to say I used to assume consumption was a sign of wealth. Fancy car? Must be rich. Now I realize conspicuous consumption says very litt...

I'm concerned by open source projects using only Yarn in their examples

I'm concerned by open source projects using only Yarn in their examples. Please use npm for your docs. - npm is the default - Yarn only docs create...

React tip: Context can enhance performance too

React tip: Context can enhance performance too. Example: Have a component that needs some data, but some of its parents don't need that data? Consi...

Little JavaScript trick I find useful: When declaring a named import, enter...

Little JavaScript trick I find useful: When declaring a named import, enter the right-hand side first. Then, you get autocompletion support from yo...

Working with dates in JavaScript

Working with dates in JavaScript? Moment is popular, but it has a few significant downsides. This post compares a variety of alternatives, with cod...

Just built a powerful React form implementation with 3 ingredients: 1

Just built a powerful React form implementation with 3 ingredients: 1. Reusable form inputs = enforce consistency 2. Hooks = share logic across reu...

My huge update to "Building Apps with React and Redux" on @pluralsight is live

My huge update to "Building Apps with React and Redux" on @pluralsight is live. 🎉 This includes a long list of enhancements to cover new tech and...

Just got confirmation that the major update to “Building Apps with React and...

Just got confirmation that the major update to “Building Apps with React and Redux” on @pluralsight goes live tonight at 1030. 🎉 I’ve upgraded all...