David Harting

June 21, 2021

Production versus consumption is a false dichotomy

Well, I suppose it is an legitimate dichotomy. But it is not an axis upon which to judge your live. The concept of measuring your time spent consuming versus producing has always bothered me. Production is not inherently more important or valuable than consumption. At least not on the cosmic scale at which life itself seems absurd, mir...
Read more

June 10, 2021

Why our household is carbon neutral 💚

I think about the climate crisis a lot. I ruminate, I feed my anxieties. But these aren’t unrealistic anxieties. This is an existential threat to humanity. I like affordable food and reliable access to water, for instance. And I hope we still have those in 20 years. The climate crisis is a systems problem. A handful of companies are re...
Read more

April 12, 2021

A great compiler makes abstractions cheap

One of the core aesthetics of golang is that a mediocre abstractions is worse than no abstraction. I think that is a fair take, earned through experience, and shared by many programmers that I admire. However, with an expressive type system and a loyal compiler at your back, we need not fear abstraction! When you trust the compiler, yo...
Read more

April 12, 2021

How to delete all but one local git branch

This post was originally published at davidharting.com on July 17, 2019. Here is a command to delete all local branches except for master. git branch | grep -v "master" | xargs git branch -D Now, let’s break down what each of these does. 1. git branch This prints all your local branches to standard out. Each branch goes on it’s own lin...
Read more

April 12, 2021

Using the mouse position with React Hooks and RxJS

This post was originally published on davidharting.com on June 2, 2019. You can see the hook in action in this Code Sandbox, or scroll to the bottom for the complete, finished code. Motivation For an interactive application, you may need to know the position of the user’s cursor. Simple enough, there are native dom events to track the ...
Read more

April 12, 2021

How I set up code-splitting on an existing React app with Webpack 4, Babel 7, and React Router

This post was originally published at davidharting.com on May 11, 2019. I recently set up code splitting for a moderately sized, two-year old React app at work. I experienced conflicting documentation and surprising bugs, so I wanted to document my findings here. Key takeaway 🔑 Avoid manual configuration if you can. If you are starting...
Read more

April 11, 2021

What I got out of Inspired by Marty Cagan

This post was originally published at davidharting.com on January 19, 2019. I recently read the book Inspired: How to Create Tech Products Customers Love by Marty Cagan. It re-shaped how I think about creating and shipping products, so I wanted to consolidate my thoughts. This is not a summary, but a place to gather my personal key tak...
Read more