Ramblings of an aging IT geek
← Ramblings of an aging IT geek
tooling

i finally stopped reaching for grep

After years of grep and find muscle memory, switching to ripgrep and fd for everyday code search, and the small frictions of retraining fingers that knew the old flags by heart.

A mechanical keyboard lit beside a terminal full of search results

I have typed grep -rn more times than I have typed my own name. It is wired into my fingers below the level of thought, and find . -name is right behind it. So when people kept telling me to try ripgrep and fd, my honest reaction for a long time was: the old tools work, I know them cold, leave me alone. Then I actually tried them on a real codebase, and the thing that won me over was not speed. It was that they do the right thing by default.

Here is the search I run a hundred times a day, old and new:

grep -rn --include='*.go' "TODO" .
rg "TODO" -g '*.go'

The ripgrep version is shorter, but that is not the point. The point is that ripgrep respects my .gitignore without being asked, so it does not waste my time and my screen showing me hits inside node_modules, vendor, build artefacts and .git. With plain grep I had quietly trained myself to ignore screenfuls of noise from directories I never meant to search. ripgrep just doesn't show them. The first time I searched a repo and got only the files I actually wrote, it felt like someone had cleaned a window I had stopped noticing was dirty.

A close-up of ripgrep results, colourised and grouped by file

fd is the same story for find. The classic find syntax is a small language of its own, with its -name and -type f and the \; you always forget to escape. fd is just fd pattern, sensible defaults, gitignore-aware, and readable:

find . -type f -name '*.test.go'
fd -e go test

Yes, the speed is real, and on a big tree it is dramatic. ripgrep will chew through a kernel-sized repo faster than I can read the first page of output. But raw speed was never my bottleneck. My bottleneck was the friction of remembering flags and filtering out junk, and both tools removed it.

The genuinely hard part of switching was not the tools. It was the fingers. For the first fortnight I typed grep -rn on autopilot, watched it grind through node_modules, sighed, and retyped it as rg. Muscle memory does not read your blog posts about productivity. I aliased nothing, deliberately, because I wanted to learn the new commands rather than hide them behind the old names and never internalise them. It took a couple of weeks of mild annoyance before rg and fd became the reflex.

I have not deleted grep and find, and I won't. They are everywhere, they are on every box I ssh into, and when I am on a stranger's server at 3am they are what I have. Knowing them is not optional. But on my own machine, for my own work, I reach for the new ones now without thinking, which is the only real proof a tool has won. The old tools were not wrong. The new ones are just less work, and less work, repeated a hundred times a day, adds up to something you feel.