Blog

Posts on software development, careers, and craft.

Programming irony: A complex solution often feels impressive

Programming irony: A complex solution often feels impressive. Why? Because complexity is hard to understand. So it looks like it was hard to build....

TIL: To log all clicks in React, use onClickCapture

TIL: To log all clicks in React, use onClickCapture. This simple component logs clicks in all child components. 😎 #reactjs

Performance pattern If your web app requires a lot of data that changes...

Performance pattern If your web app requires a lot of data that changes rarely: 1. Store the data in localStorage. 2. When the user returns, read f...

Useful organizational skills in software development: - Name things well -...

Useful organizational skills in software development: - Name things well - Group related things together - Keep unrelated things separate - Avoid r...

TypeScript protects from edge cases

TypeScript protects from edge cases. Example: I reference something that may be undefined. In JS, I get a runtime error, but only if I happen to ex...

TypeScript habit: When trying a new library, TS slows down experimentation

TypeScript habit: When trying a new library, TS slows down experimentation. So I use plain JS in @codesandbox and try it out. If it meets my needs,...

My routine for happiness during the pandemic: Sleep well Exercise daily...

My routine for happiness during the pandemic: Sleep well Exercise daily Learn Work hard on things I can control Be grateful Mindset: Life doesn’t s...

Confession: For the first 10 years of my career, I considered automated...

Confession: For the first 10 years of my career, I considered automated testing a waste of time. Now, after 10 years of writing tests, I realize: 1...

Today I learned: 1

Today I learned: 1. In Github, type the letter t 2. A file finder appears 3. Enter a filename to open it Fast and slick! 🔥 #git #github

I'm jumping between 2 projects: 1

I'm jumping between 2 projects: 1. React in JavaScript 2. React in TypeScript The difference: In JS, I spend more time in the browser resolving run...

Valuable developer traits: Humility and self-awareness These traits help you...

Valuable developer traits: Humility and self-awareness These traits help you say: I'm stuck. I'm doing this the hard way. I need a break. I need he...

JSON doesn't support comments

JSON doesn't support comments. So here's how I comment npm scripts in package.json. 😎 #javascript #npm

I rarely say "that's impossible"

I rarely say "that's impossible". This has me stumped. So in the spirit of Cunningham's Law, I'm going to say it: It's impossible to animate an exp...

My days of complaining about CSS positioning are over

My days of complaining about CSS positioning are over. Flexbox is awesome. 🔥 I'm embarrassed to say I was a grumpy old man floating divs until abo...

React = Legos for adults

React = Legos for adults. Except it's even better because: - Many people share their Legos for free 😃 - If I find a Lego that mostly works, I can...

Why I ❤️ being a UI specialist: ✔️Close to the user ✔️I choose my tools...

Why I ❤️ being a UI specialist: ✔️Close to the user ✔️I choose my tools ✔️Can work from anywhere ✔️Cross-team blockers are rare ✔️I’m not impeded w...

Why I no longer write classes in #Javascript: I don't need them

Why I no longer write classes in #Javascript: I don't need them. Instead, I use: 1. Plain objects (data only, no behavior) 2. Pure functions (no si...

I prefer #javascript function declarations over function expressions and...

I prefer #javascript function declarations over function expressions and arrow functions. Function declaration benefits: 1. Hoisted, so order doesn...

An unexpected benefit of closing schools: Slowing down creates space for...

An unexpected benefit of closing schools: Slowing down creates space for exploring. With this free time, my youngest son has discovered a love of r...

PSA: Please don't name a variable "data"

PSA: Please don't name a variable "data". It tells your fellow programmers literally nothing about what's inside.

Over the last decade, I've consumed 100's of books, videos, blogs, etc

Over the last decade, I've consumed 100's of books, videos, blogs, etc. Common thread: ✅ Non-fiction ✅ Timeless content I just spent the day creati...

When I'm unsure what HTML element to use, I Google for "HTML5 Flowchart"

When I'm unsure what HTML element to use, I Google for "HTML5 Flowchart". Super handy. 🔥 Why is semantic HTML important? - Better SEO - Easier mai...

Why I ♥️ software development: I don't have to get it right the first time

Why I ♥️ software development: I don't have to get it right the first time. In many fields, mistakes are dangerous and costly. In software developm...

JavaScript rest syntax can remove properties too

JavaScript rest syntax can remove properties too. For example, given this object: const user = { name: "Cory", address: { city: "KC" } } This creat...

I'm really enjoying the 16" MacBook Pro

I'm really enjoying the 16" MacBook Pro. Fantastic keyboard Runs cool, even with the i9 Fan virtually never runs Excellent battery life Bright, low...

Client: Help

Client: Help! Me: This Hook solves your issue. Client: We only use React classes. Hooks seem scary. Me: Okay. I'll rewrite the Hook to work in your...

Want to create a new #JavaScript object with an optional property

Want to create a new #JavaScript object with an optional property? Use spread (...) with the logical and operator (&&). const user = { name...

The "best" technology often doesn't win

The "best" technology often doesn't win. There are many non-technical reasons to pick a technology. Community Job opportunities Ability to hire Eco...

Adopting TypeScript: Short-term pain for long-term gain

Adopting TypeScript: Short-term pain for long-term gain. ✅Better autocomplete ✅Safe, fast refactoring ✅Compile-time errors instead of run-time erro...

I ♥️ Hooks

I ♥️ Hooks. But each useEffect should clearly convey intent. Simple solution: 1. Nest a well-named function 2. Call it Otherwise useEffect merely s...