Re:Ask HN: How to become good at naming things in code?
by tcbasche on Sunday April 05, 2020 @07:30PM
(#22789626)
Ah 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.
Re:Ask HN: How to become good at naming things in code?
by Someone on Monday April 06, 2020 @03:28AM
(#22791559)
”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 (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.
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.