4 min read
The Rule of Three
Heavy sets quiet everything except the part of my brain that counts things. That morning it counted this: the same four commands, typed eleven times before lunch.
Nothing about the fix is rocket science. An alias is one line; a shell function is five. Nobody gets hired for knowing the syntax. What separates people is the reflex: noticing repetition at all, and owning a place where the fix lives forever. Mine is the quiet family of dotfiles every home directory carries. .zshrc on my Mac, .bashrc on the Windows machine, .gitconfig for version control: aliases, functions, Node version switching. Small parts, one system, everywhere I work.
Under the bar, repetition builds muscle. In the terminal it just burns focus, the one resource I refuse to waste. I’ve hunted invisible taxes before. This one hides in muscle memory.
The rule
Years of production work distilled it into one sentence: anything I do more than three times a day gets a script. Not a ticket, not a someday: a script, that same day.
It’s also how I read other engineers. You can tell how long someone has lived in a terminal not by how fast they type, but by how little.
Your private standard library
Every terminal session begins by reading one file: ~/.zshrc (or .bashrc, if bash is your home). Most developers treat it as a junk drawer for whatever Stack Overflow told them to paste in 2019. I treat mine as a private standard library: loaded into every session, versioned, deliberate.
The entry level is the alias, a decision compressed:
alias dev='cd ~/dev'
alias cc='claude'
alias dbg='open -a "Google Chrome" --args --remote-debugging-port=9222'
Navigation, an AI agent, a browser that wakes up with its debug port already listening. Each one keystroke-cheap, instantly there. Three lines, three decisions I never make twice.
And the principle doesn’t stop at the shell. ~/.gitconfig is the second half of the library. A few lines under its [alias] section and version control has routines too:
dog = log --decorate --oneline --graph
god = log --decorate --oneline --graph --all
confl = diff --name-only --diff-filter=U
git dog walks a branch as a graph, git god shows the whole repository at once, and git confl prints exactly the files still bleeding after a merge. No digging through git status noise while a rebase is on fire.
Where aliases end, functions begin
An alias is text substitution. A function is a program that lives inside your shell, with arguments, logic, and opinions:
c() {
nvm use node --silent
cc "$@"
}
One letter. It moves the session to the newest Node.js on my machine and hands everything over to the agent. The elegant part, though, is what it doesn’t do.
The scope trick nobody teaches you
nvm isn’t a binary; it’s a shell function sourced into your session. When it switches versions, it rewrites the PATH of that one shell process and nothing else. No global state, no sudo, no side effects. And I verified it in a scratch shell before writing this sentence, because I don’t publish behaviour I haven’t watched happen.
Which means my terminals live in different decades, peacefully:
# terminal 1: client project pinned to the past
cd legacy-app && nvm use # reads .nvmrc → v20.19.0
# terminal 2: the agent on the newest engine
c # → v24.x, this session only
Close the second terminal and it’s as if it never happened. Ten Node versions coexist on this machine. Number of conflicts, ever: zero.
What this is actually about
Not keystrokes. A five-line function saves me maybe two minutes a day: call it seven hours a year, not even one working day. The arithmetic is almost embarrassing. What it changes is posture: defaults are decisions someone else made for you, and every script in my dotfiles is a default I’ve overruled.
The terminal has no guardrails. That’s why most people avoid it, and why I live there. The same fluency that builds these small tools is the reason I read other people’s scripts before I run them. Fluency cuts both ways; I keep mine pointed at my own machines.
Under the bar, the principle is identical: strip what’s unnecessary, repeat what compounds, and let time do the multiplying. The tax, refunded. If you build teams (or unreasonable roadmaps) out of people who think like that, my inbox is open.