Blog
Posts on software development, careers, and craft.
In #JavaScript, I find it's typically preferable to create a file with plain...
In #JavaScript, I find it's typically preferable to create a file with plain functions than to declare a class. Here's a diff that outlines the adv...
One of the most valuable concepts I learned in school: Opportunity cost -...
One of the most valuable concepts I learned in school: Opportunity cost - The loss of potential gain from other options when an option is chosen. T...
Loving the new React devtools
Loving the new React devtools. The "rendered by" section is going to be handy for navigating big apps. And I can change live data when using Hooks....
The combination of @Cypress_io and Cypress @TestingLib has made testing such...
The combination of @Cypress_io and Cypress @TestingLib has made testing such a wonderful experience. 😍 Look at this test. It reads so clearly. No...
In React, I rarely have perf issues
In React, I rarely have perf issues. But I recently used context to resolve a perf issue: I used context to avoid passing props to a component that...
Starting these activities can radically improve quality of life, even if...
Starting these activities can radically improve quality of life, even if you’re not good at it at first: Reading Speaking Writing Saving Exercise E...
I’m frugal with liabilities: -car -clothes -cable TV Liabilities depreciate...
I’m frugal with liabilities: -car -clothes -cable TV Liabilities depreciate and distract. I happily spend money on assets: -books -experiences -gym...
My preferred workflow when fixing a bug: 1
My preferred workflow when fixing a bug: 1. Can I write an isolated, automated test for this bug? If not, refactor so I can. 2. Write failing test...
Attitude checklist - When I'm feeling lethargic or moody
Attitude checklist - When I'm feeling lethargic or moody. I find it's typically one of these 5. ✅ Do I need to eat? ✅ Have I drank enough water? ✅...
Just learned about GitHub's handy suggestion feature
Just learned about GitHub's handy suggestion feature. This makes it easy to create suggestions in PRs that people can accept with a single click. S...
Habit: At the gym, I walk up to the guys who I have a physique I’d like to...
Habit: At the gym, I walk up to the guys who I have a physique I’d like to emulate. I ask them about their routine and diet. I do the same with dev...
When most people say they want to be a millionaire, what they really mean is...
When most people say they want to be a millionaire, what they really mean is “I want to spend a million dollars,” which is literally the opposite o...
TIL With async/await, you must await a promise for try/catch to catch the error
TIL With async/await, you must await a promise for try/catch to catch the error. If you return the promise without using await, the rejected promis...
Great example of the benefits of async/await
Great example of the benefits of async/await. Love how it eliminated the nesting in the chained promises version. Much easier to read. 👍 #javascript
The fastest approach I've found for wrapping existing markup in a new tag: 1
The fastest approach I've found for wrapping existing markup in a new tag: 1. Type tag before the element I want to wrap 2. The editor auto creates...
For most my career, I ran 2-3 monitors
For most my career, I ran 2-3 monitors. 4 years ago, I switched to a single monitor. The result? I've found I actually prefer it. ¯\_(ツ)_/¯ I just...
Programmer tests should: Minimize programmer waiting
Programmer tests should: Minimize programmer waiting. Run reliably. Predict deployability. Respond to behavior changes. Not respond to structure ch...
I'm a huge fan of @kentcdodds testing-library
I'm a huge fan of @kentcdodds testing-library. Just wrote a solid test suite for a reusable React Alert in well under and hour. Love how the API en...
3 books that had a huge influence on my career: 1
3 books that had a huge influence on my career: 1. The 4-Hour Work Week (Maximize hourly impact) 2. Ego is the Enemy (Be humble, open, driven by co...
Working in a sloppy codebase under a tight deadline: “I will have to...
Working in a sloppy codebase under a tight deadline: “I will have to remember ‘I am here today to cross the swamp, not to fight all the alligators....
Why I love modern UI development: ✅ Work solely on my local machine ✅ No...
Why I love modern UI development: ✅ Work solely on my local machine ✅ No internet required ✅ Call a local mock API that I control ✅ Build each comp...
Two concerning trends I'm seeing in modern React apps: 1
Two concerning trends I'm seeing in modern React apps: 1. Creating custom hooks when the Hook is only useful for one component. 2. Declaring a cont...
When someone new joins the team, I try to avoid verbal training
When someone new joins the team, I try to avoid verbal training. I believe processes should be documented. So I link to the relevant doc. If one do...
Speaker tip: "Don't memorize your talk
Speaker tip: "Don't memorize your talk. Memorize your stories." - Seth Godin This works. I've presented 30 min to full day talks without slides or...
When a tweet ends with “don’t @ me”, I hear this: “Listen to me
When a tweet ends with “don’t @ me”, I hear this: “Listen to me. But I’m not willing to listen to you.” Am I misreading? Is there a more charitable...
I've seen microfrontends work well with these rules: 1
I've seen microfrontends work well with these rules: 1. Consistent tech. All microfrontends use the same JS lib (e.g. React) 2. Each team shares *d...
The 3 conditions that sociologists consider crucial to making close friends: 1
The 3 conditions that sociologists consider crucial to making close friends: 1. Proximity 2. Repeated, unplanned interactions 3. A setting that enc...
Common thinking: "I need to add code to justify my job"
Common thinking: "I need to add code to justify my job". Yet some devs remove more code than they add. 👍 "In my 3 years at Facebook, I added 391,9...
Avoid trading long-term happiness for short-term pleasure
Avoid trading long-term happiness for short-term pleasure. This mindset avoids binging, cheating, overspending, and other destructive hedonism.
Question: For those writing automated integration tests/end-to-end tests,...
Question: For those writing automated integration tests/end-to-end tests, how do you handle data? Options: 1. Call a real DB 2. Call a mock API 3....