Blog
Posts on software development, careers, and craft.
It's done
It's done! "Managing React State" is live! 🎉 This course explores 8 different ways to handle state in React apps today, and how to choose between...
I don't need XState
I don't need XState. State enums work. I don't need MobX. Deriving state in render works. I don't need Formik. Plain React works. I don't need Redu...
Formik vs Plain React for Forms – Worth it?
I typically use plain React for forms. But I just converted a React form to use Formik. Results (sizes minified): Plain React: 130 lines of code, 46KFormik: 105…
I typically use plain React for forms
I typically use plain React for forms. But I just converted a form to use Formik. Results: (LOC = Lines of code) Plain React: 130 LOC, 46K Formik:...
To me, freedom is the game
To me, freedom is the game. Here’s how I optimize for freedom: Avoid debt and needless spending Live beneath my means Be independent - build my biz...
For people just starting React today, are classes worth learning anymore
For people just starting React today, are classes worth learning anymore? My take: Probably not. I can only think of 2 reasons to learn classes tod...
5 reasons I prefer React function components over class components: 1
5 reasons I prefer React function components over class components: 1. Less code 2. Simpler mental model 3. Avoids "this" keyword confusion 4. Shar...
Handy pattern: Declare a single status to replace related state
Handy pattern: Declare a single status to replace related state. I call it a "poor man's state machine" What term would you use to describe the pat...
You don’t have to work overtime to get ahead
You don’t have to work overtime to get ahead. I started my career as “Associate Software Engineer” Over the years I got consistent raises and promo...
Working over 40 hours a week in a salaried position = giving time away
Working over 40 hours a week in a salaried position = giving time away. Working nights and weekends on a side business = building a path to indepen...
Two rules that help me stick to exercise: 1
Two rules that help me stick to exercise: 1. Skipping exercise doesn't save time. Why? Because I get more done after a workout. Exercise improves m...
Growth mindset: I want to get better
Growth mindset: I want to get better. I'm open to learning from anyone. I'm searching for truth, not validation. I'm not afraid of asking a stupid...
I've worked remote for years
I've worked remote for years. This year isn't like normal remote work. It's more isolating. I miss my social breaks. Travel to conferences Training...
Why I prefer videos over live teaching/webinars: 1
Why I prefer videos over live teaching/webinars: 1. Carefully edited (typically) 2. I can pause it 3. No delays from people having issues 4. I can...
I ♥️ #remotework
I ♥️ #remotework. “A person with a 1 hour commute has to earn 40% more to be as satisfied with life as someone who walks to the office. For a singl...
Meritocracy: Picking people based on talent rather than on class privilege...
Meritocracy: Picking people based on talent rather than on class privilege or wealth. Problem: Privilege and wealth create more opportunities for b...
Sometimes, I want to use a React Hook in an existing class component
Sometimes, I want to use a React Hook in an existing class component. Two options: 1. Convert the class to a function 2. Wrap the Hook in a higher-...
Questions to ask when picking a data structure: How many records
Questions to ask when picking a data structure: How many records? How will records be accessed? Does order matter? Does serialization size matter?...
Four Reasons React Renders (and three ways to stop it)
There are four events that cause a React component to render: State change Prop change Parent render Context change When state changes, you can skip the render …
4 reasons React renders: 1
4 reasons React renders: 1. State change 2. Prop change 3. Parent render 4. Context change When props change or a parent renders, you can skip the...
Life as a dev: Every few days, I learn something that makes me wish I could...
Life as a dev: Every few days, I learn something that makes me wish I could go back and improve my previous code.
Four Ways to Fetch Data in React
React is a focused component library. So it has no opinion on how to request remote data. If you’re requesting and sending data to web APIs via HTTP, here are f…
Good habits create positive feedback loops
Good habits create positive feedback loops. Sleep well Exercise Eat healthy Focus during work Save money Habits interact. So one good habit fosters...
On Admiring Simplicity
A poorly-designed solution may seem impressive. Why? Because it’s complex and unapproachable. So it looks like it was hard to build. A well-designed solution ma…
A poorly-designed solution may seem impressive
A poorly-designed solution may seem impressive. Why? Because it’s complex and unapproachable. So it looks like it was hard to build. A well-designe...
I ❤️ composition
I ❤️ composition. There are many composition tools: Functions Classes Components Libraries Packages Composition avoids overwhelm and duplication by...
In React, there are at least 8 ways to handle state
In React, there are at least 8 ways to handle state. This app uses all 8 approaches: https://github.com/coryhouse/react-state-demo The pull request...
Fallacy: Motivation creates action
Fallacy: Motivation creates action. Reality: Action creates motivation. So, to create motivation, I have to force myself to get started. I have to...
Over abstractor: “We should wrap React in case we move to Vue or Svelte.” What
Over abstractor: “We should wrap React in case we move to Vue or Svelte.” What? No. That won’t work. Under abstractor: “We can call fetch in each c...
Some teams claim they're "too busy" to: 1
Some teams claim they're "too busy" to: 1. Write tests 2. Speed up the build process 3. Configure CI / CD 4. Mock the API 5. Configure linting / au...