jameskerr.blog

GitHub Mastodon RSS X YouTube
James Kerr's Profile Picture

Hello and Welcome!

I am James Kerr. I live in San Francisco writing software and pondering our collective existence.

I am building simple budget software called Tend.

I am the author of a few JavaScript packages, the most popular being react-arborist.

Here on my blog you'll find prose and poetry on topics such as:

#javascript #money #react #addiction #ruby #god #ci #parenting

February 13, 2025

SuperDB Website Build Review

hugo

My work designing and developing the superdb.org website is finished. The first commit was on October 4th, 2024 and the final commit was on February 5th, 2025.
Read More

August 15, 2024

useStateObject: A Simple, Convenient API Around useState

react

I am loving this API for working with React state. It’s a very light wrapper around useState. I call it useStateObject.
Read More

July 1, 2024

The 3 Types of CSS Utility Classes

css html

A 9.0 earthquake shook my front-end world when I discovered “layout primitives” at every-layout.dev. Then an aftershock rolled through when I learned about fluid sizing and spacing tokens from utopia.
Read More

June 26, 2024

Ship That Code • Publish That Post

programming writing

Two articles I read this week have inspired the heck out of me. The first was by Jared Turner of thoughtbot with the punchy title “WIP is waste”.
Read More

June 13, 2024

How to Debug NodeJS with Breakpoints in VSCode

javascript

I made a quick screen recording using the VSCode debugger to break on a line of code in my NodeJS electron process.
Read More

June 2, 2024

The One Thing Missing in Every Budget App: Spending Commitments

money

The one thing missing in every budgeting application is the “Spending Commitment”. Definition: “A thing I am already committed to paying for”
Read More

April 23, 2024

Fix for Kamal Deploy Assets Not Updating

ci rails kamal

Does this sound like you? You are using Sprockets to pre-compile assets for production. You are using Kamal to deploy. You have asset bridging enabled in your deploy.
Read More

April 22, 2024

How to Set Output Values in Github Actions

ci github

This is the syntax for setting an output parameter in a Github Actions step. echo "{name}={value}" >> "$GITHUB_OUTPUT" Here’s an example of using this syntax in a workflow step.
Read More

April 17, 2024

Responsive Sizing for React Arborist Tree Component

javascript react react-arborist

Many people ask me about how to dynamically set the width and height of the Tree component based on its parent using react-arborist.
Read More

April 16, 2024

Cache the Result of a JavaScript Getter Method

javascript

My first programming language was Ruby. Well, it was actually Microsoft Excel, then VBA, then C# for a university class, then Ruby.
Read More

April 16, 2024

The Friend Is You

addiction love god

Imagine hanging out with someone all day who berates you. They make final judgements about your character. They criticize anything you do imperfectly.
Read More

March 28, 2024

Finally Understanding How Array.sort(comparator) Works

javascript

After 13 years of JavaScript, I finally have a way to remember how the comparator function in Array.sort() works. I think the trouble is that all the examples use this shorthand syntax.
Read More

March 27, 2024

Using @monaco-editor/react in Electron without Internet Connection

react electron monaco

The Monaco Editor is awesome. It’s what powers VSCode. I wanted to use it to power the query editor pane in Zui, the data exploration app I work on.
Read More

March 5, 2024

Transitions All Settled

javascript

I just published a JavaScript library called transitions-all-settled that allows you to wait for CSS transitions to settle before you do something.
Read More

November 8, 2023

There Are Only Two Types of Transactions

budgets money

There are only two types of transactions. The ones you are present for. The ones you are not. This just dawned on me.
Read More

November 6, 2023

Against Single Element React Components

react javascript

It's not uncommon to see this type of single element React component. function Title({ children, ...rest }) { return <h1 {.
Read More

October 27, 2023

How to Optimize Your Hugo Blogging Workflow on Mac

writing

I love this quote by John Cutler from his post on disincentives. “Good things can happen when you make it easier to do good things.
Read More

October 22, 2023

A Better Goal Than Sinless Perfection

god

Any two people in a close relationship are bound to eventually hurt each other. To most of us, it is no surprise when this happens.
Read More

October 17, 2023

I Have Enough

poem money

I have enough food in my kitchen. I have enough water to drink. I have enough clothes to wear. I have enough things in my house.
Read More

October 12, 2023

Company Culture & Church Community

church

This is a great podcast episode about company culture. The gist is, it doesn’t matter what people say or write about what the culture is.
Read More

October 2, 2023

Let It Flow

poem

I was just in the gym and as I lifted a weight I thought of the energy flowing out of me to lift it.
Read More

September 22, 2023

How to Pipe a NodeJS Readable Stream into a Child Process

javascript node

I love pipes. Anytime I can pipe something somewhere, it seems that order has claimed a victory over chaos. In fact, there is pipe-related photo of me at the end of this article for your viewing pleasure.
Read More

September 20, 2023

Waiting for a Comet

poem

Comets are constantly falling. We don’t know when. But if we’re open, our eyes are open, The comment will appear.
Read More

September 16, 2023

A Battle of Wit

poem

Swords drawn, Draw blood, Blood in the water Recover, Respond, Respect Cross the line, Cut too deep, Feel the heat
Read More

August 1, 2023

Partially Controlled Components: A Declarative Design Pattern in React

react

A common distinction in React is Controlled vs Uncontrolled components. But the real world is not so black and white…
Read More

July 10, 2023

Others May Know More

god

A child knows nothing about itself. Its body is a mystery, its ideas, its dreams, its feelings. The child relies on caregivers to teach her everything.
Read More

June 29, 2023

It’s Good to Wonder About Mysteries

existence

I was talking with a group of friends trying to come up with possible answers to unanswerable questions like: What happens when we die?
Read More

June 27, 2023

React Hook for Avoiding Flash of Empty UI While Data Transitions

react

I’m working on a React app that has frequent data transitions. Each time a user submits a query, the state is reset as we wait for a response from the server.
Read More

June 21, 2023

Confronting a Man at the Playground

parenting

While at a playground this weekend a man talked to my 3-year-old son in a way that upset me and I had to do something about it.
Read More

June 19, 2023

Persisting the Human Experience

existence

Experiences compress into memories. Memories compress into feelings. Feelings compress into instincts. Instincts compress into the unconscious. The unconscious compresses into the collective human unconscious.
Read More

May 31, 2023

Joshua Tree Trip

travel

We took a trip down to Joshua Tree this weekend for a cousin’s wedding. For the first time, I could appreciate the gifts of a desert climate.
Read More

May 5, 2023

Jet Fuel

poem

We build an engine for it. It propels us to new heights. It explodes. It destroys everything around it. It takes us to heavenly places.
Read More

May 4, 2023

5 Tricks for Taking Great Photos

photography

I’ve owned a full frame camera for over 5 years. I’ve acquired 3 lenses and snapped many thousands of photos. And yet, last week I discovered these five tricks and was shocked by my ignorance of them.
Read More

April 3, 2023

It’s a Gift for Me to Be Angry

relationships

When I’m angry I stop needing everyone to like me. I don’t care if they approve of what I do. My face doesn’t hurt from smiling all the time.
Read More

March 30, 2023

13 Decisions to Make Before Publishing JavaScript to NPM

javascript npm

This post is half rant, half guide. Each of these 13 questions reveals tradeoffs that take time and mental energy to research.
Read More

March 23, 2023

Netflix Does Not Have My Best Interest

addiction

I watch Netflix because I’m too tired to do anything else. The kids are finally sleeping and I’m spent. It’s meant to be a quick escape from life before I do what I really need to do which is sleep.
Read More

March 22, 2023

Embedded Divinity

god

What if we didn’t think of God as infinite. What if God poured itself into this particular universe. What if He’s completely bound to this one cosmos.
Read More

December 23, 2022

Adults Don't Share

parenting

All the time at the playground I hear, “good sharing!” and “no no Jackson, you need to share”. We parents think it is some critical skill that children need to learn.
Read More

December 21, 2022

TypeScript Classes Are Giving Me Carpal Tunnel

typescript

Whenever a class needs a few arguments in TypeScript, I cringe because I know I’m going to need to perform a ceremony to make it happy.
Read More

June 13, 2022

Sharing Steps in Github Action Workflows

ci electron github

I’ve got an electron app that needs to be built on all three platforms. I’ve got three workflow files all with slightly differing steps.
Read More

May 3, 2022

How to useRef and forwardRef in React

react

What do I do when my component uses a ref internally but also needs to forward a ref from its parent?
Read More

  • jameskerr.blog
  • GitHub
  • Mastodon
  • RSS
  • X
  • YouTube