3 ms·
Try having a naming system, I usually name things based on what they do and typically follow the same ordering format across the board so everything builds on e
by saluki 7y ago
Try having a naming system, I usually name things based on what they do and typically follow the same ordering format across the board so everything builds on each other and matches up.
I'll also add some Star Wars and other movie/pop culture references to keep things interesting. And hopefully bring a smile to someone editing the code in the future.
Kamino is one of my favorites for anything cloning or duplicating related for example.
You do need to be decisive and quick so it doesn't hold you up, with a system you will be, and realize that sometimes a name just isn't that critical.
Avoid being cryptic though, think about what name would make sense to someone looking at your project for the first time.
- dennisy 7y agoThanks! Could you provide a few examples from your system?
- tcbasche 7y agoAh so there are people out there like this, who think random pop culture references will 'bring a smile' to someone editing the code. Please don't. 'Avoid being cryptic' - but please, throw in a reference no-one might get or something unrelated to the purpose of a variable. Give me a break.
- sloaken 7y agoIMHO adding a Star Wars or movie / pop culture reference fits the definition of being cryptic.
- Someone 7y ago”Kamino is one of my favorites for anything cloning or duplicating related for example.” That seems almost straight out of https://github.com/Droogans/unmaintainable-code https://github.com/Droogans/unmaintainable-code (which has good anti-hints on naming) If you can’t resist the urge to be a bit playful, use xerox for such a thing. Way more people would get that.