Blog
Posts on software development, careers, and craft.
Woah, Chrome now has a built in recorder
Woah, Chrome now has a built in recorder. Includes metrics for measuring performance too. And you can export the results to a Puppeteer script. htt...
Woah, I just found an elegant way to resolve package-lock.json conflicts:...
Woah, I just found an elegant way to resolve package-lock.json conflicts: npm install --package-lock-only "npm will automatically resolve any confl...
Mac performance / battery life tip: Tell Spotlight to ignore the folder...
Mac performance / battery life tip: Tell Spotlight to ignore the folder where you store source code. Especially important for #JavaScript devs due...
Found a M1 Max 32GB in stock at my local Apple store and couldn’t resist
Found a M1 Max 32GB in stock at my local Apple store and couldn’t resist! Pros over my 2019 i9: ✅ Fast! Runs Jest tests twice as fast as my i9. ✅ A...
This week I worked with a team to get code coverage over 80% (a corporate...
This week I worked with a team to get code coverage over 80% (a corporate minimum). The problem with this effort: Code coverage can be gamed. Sure,...
How to create a React app in 2021: Client rendered: create-react-app Static,...
How to create a React app in 2021: Client rendered: create-react-app Static, pre-rendered: @GatsbyJS, @astrodotbuild Server-rendered: Next.js by @v...
For most of my life, my goal was to save enough money that I could stop working
For most of my life, my goal was to save enough money that I could stop working. Now I realize that was the wrong goal for me. I love what I do. So...
Coding is writing
Coding is writing. So: Better grammar = better code. Better vocabulary = better code. Better organizational skills = better code. More empathy for...
I'm trying out pnpm (a fast, powerful replacement for npm)
I'm trying out pnpm (a fast, powerful replacement for npm). It clearly tells me if I'm using a deprecated package, or if a newer major version is a...
JavaScript's 8 falsy values: 0 -0 false NaN "" (empty string) null undefined...
JavaScript's 8 falsy values: 0 -0 false NaN "" (empty string) null undefined document.all Everything else is truthy. #javascript
The 4-step bug fix: 1
The 4-step bug fix: 1. Write a test that reproduces the bug (assert the correct behavior). 2. Watch the test fail, due to the bug. ❌ 3. Fix the bug...
Woah, just found Sapling, a @code extension that displays my app's React...
Woah, just found Sapling, a @code extension that displays my app's React component tree! 😍 I like visualizing and navigating the tree this way. Es...
I'm working on 2 similar React component libraries
I'm working on 2 similar React component libraries. One is written in #javascript. One is written in #typescript. In the JS version, I frequently f...
HTML z-index tip: You might not need a z-index at all
HTML z-index tip: You might not need a z-index at all. Here's why: Later HTML elements are automatically rendered above earlier elements. So, a z-i...
Software dev is an amazing career
Software dev is an amazing career. Work anywhere. Flexible hours. Low red tape. Intellectually challenging. Lots of creative freedom. Many job oppo...
Common problems I see at companies that are struggling with their reusable...
Common problems I see at companies that are struggling with their reusable component library: ❌Weak docs ❌No UX team ❌No dedicated support team ❌Po...
7 practices that take more time up front, but save time later: 1
7 practices that take more time up front, but save time later: 1. Automating tests 2. Declaring types 3. Refactoring 4. Writing docs 5. Performing...
Why I store all URLs in a one file: ✅ Support reuse ✅ Enforce consistency ✅...
Why I store all URLs in a one file: ✅ Support reuse ✅ Enforce consistency ✅ Easy to see duplication ✅ Test URLs in isolation ✅ Simple call sites =...
This Cypress post just blew my mind
This Cypress post just blew my mind. Summary: Avoid initializing test data via the UI. Instead, add a test-friendly API to your app. The API will i...
Problem: You're using @Cypress_io for tests, and need to log in for each test
Problem: You're using @Cypress_io for tests, and need to log in for each test. Solution: Just found the new session API! It holds cookies & ses...
Handy pattern I enjoy: Clone the repo twice
Handy pattern I enjoy: Clone the repo twice. This way, I can have two local copies, pointed to different branches. I find this is useful when I nee...
7 things that keep teams from doing Continuous Delivery (deploying daily or...
7 things that keep teams from doing Continuous Delivery (deploying daily or even hourly): 1. Non-atomic PRs. Solution: Each PR must be ready for a...
A well-named test answers 3 questions: 1
A well-named test answers 3 questions: 1. What code is being tested? 2. What scenario is being tested? 3. What is the expected result? Answering th...
I recently reviewed a team's codebase
I recently reviewed a team's codebase. There were dozens of broken automated tests. Why? The tests weren't being run on a CI server. My response? �...
My favorite way to estimate tickets
My favorite way to estimate tickets? Don’t. 😜 Instead, ask this: Can we break this ticket down further? This question leads to small tickets that...
Sprint mindset: "We estimate and commit to finishing work by this date"
Sprint mindset: "We estimate and commit to finishing work by this date". Kanban mindset: "We optimize for flow, prioritize often, visualize work-in...
The problem with sprints: Sprints create a constant sense of hurry
The problem with sprints: Sprints create a constant sense of hurry. Constantly feeling rushed is a big problem: ❌Hurts intrinsic motivation ❌Reduce...
Habit: I often work in my car
Habit: I often work in my car. I do this when I drive my kids to their activities. To save a round-trip, I wait in my car and work. I bring my lapt...
Two reasons to use HTML <fieldset> on forms: 1
Two reasons to use HTML <fieldset> on forms: 1. Group related fields on a big form. Add a <legend> under each <fieldset>. This he...
10 lessons I've learned about handling React state over the last 7 years
10 lessons I've learned about handling React state over the last 7 years... (thread) #react #reactjs