Naming Things in Code – journal.stuffwithstuff.com
When I’m designing software, I spend a lot of time thinking about names. For me, thinking about names is inseparable from the process of design. To name something is to define it. In the beginning was the Word, and the Word was with God, and the Word was God. The Gospel According to John One of the ways I know a design has really clicked is when the names feel right. It may take some time for this to happen (I rename things a lot when I’m first putting them down in code), but that’s OK. Good design doesn’t happen fast. Of course, good names alone don’t make a good design, but it’s been my experience that crappy names do prevent one. With that in mind, here’s the guidelines I try to follow when naming things. The examples here are in C++, but work more or less for any object-oriented language. That’s what namespaces are for. If you need to add “Manager” of “Helper” to a type name, the type is either poorly named or poorly designed. Likely the latter. Types should manage and help themsel
Naming Things in Code When I'm designing software, I spend a lot of time thinking about names. For me, thinking about names is inseparable from the process of design. To name something is to define it. In the beginning was the Word, and the Word was with God, and the Word was God. The Gospel According to John One of the ways I know a design has really clicked is when the names feel right. It may take some time for this to happen (I rename things a lot when I'm first putting them down in code), but that's OK. Good design doesn't happen fast. Of course, good names alone don't make a good design,
related reading
- Onymguide.onym.co
- Essays on programming I think about a lot | benkuhn.netbenkuhn.net
- Long Names Are Long - journal.stuffwithstuff.comjournal.stuffwithstuff.com
- Naming colors in design systemsadobe.design
- Choosing Names, Shaping Worldsbenparry.substack.com
- Package names - The Go Programming Languagego.dev
- Impeccable: The missing upgrade to Anthropic's impeccable skillimpeccable.style
- Design and Researchpaulgraham.com
- Rise of Worse Is Betterdreamsongs.com
- Say precisely what you mean.index.how
- Ninja codejavascript.info
- Design tips | Malaika Aiyarmalaikaaiyar.me