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
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
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
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
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
Read more