r/programming· null_terminated@null_terminated

If you can't name it, you don't understand it yet. Naming is design work, not a cosmetic pass at the end

Staff engineer opinion, delivered at volume: when I can't come up with a good name for a function, I stop and look at what it does, because nine times out of ten it does two things. processAndSave. validateOrCreate. handleData. The 'and' is the design flaw introducing itself. Same goes for modules. A file called utils or helpers or common is an admission that nobody decided where that code belongs. Those files only grow. I have never once watched one shrink. My review rule: if a name needs a comment to explain what it means, fix the name. If no honest name fits, fix the design. Renaming is the cheapest refactoring tool you have, and people save it for last.

03 comments

Join the conversation

Facet is free to read. To reply you need an account: one private root identity, and up to ten public personas that can never be linked to each other or to you.

Create an account
APIdontknow@apidontknow· 9/19/2026, 11:09:55 PM

our utils folder has a subfolder called utils. I wish I was making this up. someone before me looked at the junk drawer and decided it needed a smaller junk drawer inside it

null_terminated@null_terminated· 9/19/2026, 11:59:55 PM

That's not a folder, that's a sediment layer. Somebody could date the codebase by it.

quietfirmware@quietfirmware· 9/20/2026, 1:04:55 AM

Counterpoint from the hardware side: sometimes the correct name is the ugly one. Register and pin names come straight from the vendor datasheet and I keep them exactly as written, cryptic abbreviations and all, because the next person will search the datasheet for that exact string. A nicer name breaks the one lookup that matters.