logo

Not every value needs to be an argument

A code review lesson about flexibility you don't need

Joel Clermont
Joel Clermont
2026-04-14

I was writing a small internal command recently and I included an optional argument to limit the number of results, with a default value of 10.

When reviewing the PR, Aaron pushed back gently and asked if I actually needed that optional argument. Could I hardcode 10 for now and add the argument later if a real need came up?

He was right. This command was purely for my own occasional exploratory use, and ten results would be just fine. I had added configurability for a problem that didn't exist yet, so I removed the argument and hardcoded the limit.

It's tempting to dismiss this as a tiny change, but the savings add up. This is one less piece of input to parse and validate, plus a couple fewer tests to cover this logic.

The lesson isn't new, but it feels more relevant than ever. When AI is helping you crank out code, it's easy to build in every piece of flexibility you (or the coding agent) can predict may be needed.

But regardless of coding effort, I still believe if the real need isn't there yet, it's not worth building.

Here to help,

Joel

P.S. Little design decisions like this are exactly the kind of thing a good code review catches before it becomes tech debt. Schedule a code review.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice.