Make a Prediction

Imagine you’re debugging, and you’re stuck. I have a technique that’s going to help. Think of an action you might take. Predict what will happen when you take that action. Take the action. Check if you were right or wrong, consider that information, and repeat. ...

June 8, 2022 · 3 min · Jake Worth

Desire Paths

We’ve all seen a desire path. They are footpaths created by erosion from human and animal traffic that communicate a wish for a path that doesn’t exist. When you walk on a paved path toward a destination and notice a shortcut in the earth, that’s a desire path. It’s the way people go, rather than the way we would wish them to go. ...

June 5, 2022 · 2 min · Jake Worth

Think Hard

Ben Kuhn’s ‘Think Real Hard’ shares a problem-solving checklist from the scientist Richard Feynman: Write down the problem. Think real hard. Write down the solution. On its face, this advice is ridiculous. If only we just sat and thought about the problem, we’d win a Nobel Prize like Dr. Feynman! ...

June 1, 2022 · 3 min · Jake Worth

PostgreSQL Polymorphism

Scenario: you need a database record that can belong to one record or another, but not both. Polymorphism and exclusivity. One approach is to create a polymorphic-style association at the data layer. By doing so, you’ll get data integrity built in, rather than trusting it will be enforced by each tenant at the application layer. ...

May 30, 2022 · 2 min · Jake Worth

Goodbye Shared Dotfiles

A lot of people start programming with shared dotfiles, copied from a team or online. I did. Maybe you’re ready to move on; how would you do that? ...

May 25, 2022 · 3 min · Jake Worth

Organizing React Components

You’re creating a React app, and want to organize your components. Or maybe you’re working in a legacy codebase, with many components in one directory, and you want to better organize them. In this post, I’ll document an approach to this problem that has worked for me. ...

May 23, 2022 · 3 min · Jake Worth

On Starting Over

I used to have a bad habit when working alone: I’d start a feature, begin doubting my approach, throw away my work, and start over from scratch. Sometimes more than once. The result? Wasted energy, abandoned code, confusion about what I had and hadn’t implemented, and repetitive rework. This post is a collection of thoughts on this practice. ...

May 18, 2022 · 3 min · Jake Worth

How to Identify the Breaking Commit With Git Bisect

Some code is broken, and you can’t figure out why. Maybe there are a lot of changes, and identifying the breaking change seems impossible. Or, maybe you’re curious about how things break in your organization. The tool you need is git-bisect. ...

May 17, 2022 · 4 min · Jake Worth

Be Fast

Great programmers aren’t fast because they’re great. They’re great because they’re fast. ...

May 6, 2022 · 2 min · Jake Worth

Commit Part of a File in Git

You’ve been working on a big set of changes, and haven’t committed to Git yet. Now, you want to commit some, but not all, changes to a file. Let’s look at adding patches. ...

May 6, 2022 · 3 min · Jake Worth

Don’t miss my next essay

Hear from me immediately when I post: no ads, unsubscribe anytime.