Blog

Posts on software development, careers, and craft.

If you navigate away quickly before a setState call completes, React warns...

If you navigate away quickly before a setState call completes, React warns in the console. A big Cypress testing benefit: It navigates so quickly t...

An option to consider: Stuck

An option to consider: Stuck? Leave early and finish later. In my old job, I often felt pressure to keep trying until the end of the day, even when...

Want more screen real estate and less noise in @code

Want more screen real estate and less noise in @code? Try Zen Mode. It only shows code. View -> Appearance -> Zen mode (Or CMD+K Z). I tweake...

One of the most satisfying experiences when writing automated tests: 1

One of the most satisfying experiences when writing automated tests: 1. I write a test that I expect to pass 2. It fails, so I assume the test is w...

Mac tip: Use Safari when on battery

Mac tip: Use Safari when on battery. Why? It's *much* more efficient. If I run Chrome on my 2019 32GB i9 MacBook Pro, I only get around 3 hours bat...

I’ve been working heavily in React for 5 years now

I’ve been working heavily in React for 5 years now. Here’s a 50+ lessons I’ve learned along the way: http://bit.ly/5yrs-react #reactjs From “Lesson...

3 keys to easily reusable React components: ✅Declare detailed propTypes (or...

3 keys to easily reusable React components: ✅Declare detailed propTypes (or use TypeScript) ✅Add comments above each propType to document and enhan...

Tip: Annoyed by how libraries like Axios place the response under .data

Tip: Annoyed by how libraries like Axios place the response under .data? Destructuring with renaming to the rescue: const { data: user } = await ax...

Lousy variable name: data It says nothing about what's inside

Lousy variable name: data It says nothing about what's inside. It's surprising how often I see this in code. It's especially problematic in dynamic...

Two reasons I ❤️ modern UI dev: 1

Two reasons I ❤️ modern UI dev: 1. Rapid visual feedback. Hit save, and see the result. Instantly.🔥 2. High autonomy. I don’t worry about my envir...

TIL: If you accidentally use a promise.then (instead of await) in an async...

TIL: If you accidentally use a promise.then (instead of await) in an async function, the catch block won't get called on error! The code on the lef...

Developer productivity is directly related to feedback speed

Developer productivity is directly related to feedback speed. Techniques to speed feedback loops: Mock APIs (fake APIs can be as fast as desired) V...

TIL you can declare a local file as an npm dependency

TIL you can declare a local file as an npm dependency. Useful for sharing code in monorepos! You don't have to actually publish the package to npm....

Merging pull requests too quickly risks hurting quality

Merging pull requests too quickly risks hurting quality. Merging pull requests too slowly frustrates the developer, interrupts flow, slows integrat...

Ever annoyed by the long list of local Git branches that are no longer relevant

Ever annoyed by the long list of local Git branches that are no longer relevant? Solution: git remote prune origin That removes all local branches...

The internet became more enjoyable when I realized: I don't have to respond

The internet became more enjoyable when I realized: I don't have to respond. Bad take? I can ignore it. Incorrect info? It's not my job to edit the...

Common thread I've found in the bios of extremely driven men: Their...

Common thread I've found in the bios of extremely driven men: Their marriages fall apart. Elon Musk Jeff Bezos Tiger Woods Arnold Schwarzenegger As...

TIL the CSS attribute selector is surprisingly powerful

TIL the CSS attribute selector is surprisingly powerful. You can style elements based on their attributes, and even target attributes that start wi...

For me, happiness requires balancing: 1

For me, happiness requires balancing: 1. Doing things I want to do because it makes me happy 2. Doing things I don't want to do, out of love for ot...

My approach for learning new tech: 1

My approach for learning new tech: 1. Create a repo to centralize my learning & resources 2. Read/watch a comprehensive resource to understand...

Now that I'm independent, I feel liberated

Now that I'm independent, I feel liberated. Why? Because I finally conquered my fear. Fear of failure. Fear of freedom. Fear of being my own boss....

Big news

Big news! Today I'm fulfilling a lifelong dream: I've quit my job to focus on consulting and training! 🎉 1. I'm helping teams transition to React:...

"Everyone has the same 24 hours" is a lie

"Everyone has the same 24 hours" is a lie. Some people use money to buy time: - Fly or Uber instead of driving - Autopay all bills - Buy a fast com...

Looking back, the moment my life turned around for the better: I finally...

Looking back, the moment my life turned around for the better: I finally stopped doing the things I assumed others expected me to do...And I starte...

Yet another reason to ❤️ async/await: If you mark a JavaScript function as...

Yet another reason to ❤️ async/await: If you mark a JavaScript function as async, anything it returns is automatically wrapped in a promise. This m...

Component-oriented development is increasingly gratifying over time: I start...

Component-oriented development is increasingly gratifying over time: I start off building basic components (inputs, buttons, etc). As I move forwar...

Just added a feature to a huge 10+ year old app written in C#, ASP NET...

Just added a feature to a huge 10+ year old app written in C#, ASP NET Webforms, and jQuery. For each change, I had to wait 7 min for the build to...

Software mistakes that are expensive to fix: - Hiring the wrong people -...

Software mistakes that are expensive to fix: - Hiring the wrong people - Choosing the wrong tech - Building the wrong thing - Not writing any autom...

Writing "Logic-less" JSX can improve readability

Writing "Logic-less" JSX can improve readability. How do you write "logic-less" JSX? Simple: Send JSX the exact data structures it needs. The diffe...

Components have many potential states (error, no data, etc)

Components have many potential states (error, no data, etc). The easier it is to see every potential state, the more likely we are to account for e...