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
- Everything I know about good system designseangoedecke.com
- Long Names Are Long - journal.stuffwithstuff.comjournal.stuffwithstuff.com
- Cognitive load is what mattersminds.md
- Mediumdnastacio.medium.com
- Essays on programming I think about a lot | benkuhn.netbenkuhn.net
- Write code that is easy to delete, not easy to... — programming is terribleprogrammingisterrible.com
- Everything I know about good API designseangoedecke.com
- Package names - The Go Programming Languagego.dev
- What is good code? (part 2)loup-vaillant.fr
- Semantic Compressioncaseymuratori.com
- LEAP 71 | PicoGK.org Blogpicogk.org
- Things I believe · GitHubgist.github.com