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

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

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

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 to consider, and identifying that breaking change seems impossible. Or, maybe you’re curious about how things generally break in your organization. The tool you need is git-bisect. ...

May 17, 2022

Be Fast

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

May 6, 2022

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

Only One Way Out of a Function

A programming style I try to practice could be described as: “there should be only one way out of a function.” Early returns can often cause more confusion than they’re worth. When possible, I avoid them in favor of a single return. ...

May 2, 2022

Am I Too Old to Become a Programmer?

“The best time to plant a tree was twenty years ago. The second best time is now.” – Chinese proverb I mentor adults who are learning to program after serving in the military. Some are in their late twenties, and some are twice that age. A common concern is that they are too old to be changing careers to programming. ...

April 28, 2022

It's Harder to Read Code Than Write It

In Things You Should Never Do, Part I, Joel Spolsky narrates Netscape’s ruinous decision to rewrite their browser from scratch. This introduced the following concept to me: “It’s harder to read code than to write it.” I believe this is true. Today I’d like to explain why. ...

April 25, 2022

The Problems With Code Screenshots

Screenshots of code are common in developer communication, but they come with real drawbacks. Here’s why I try to avoid them. ...

April 19, 2022