Hacker News new | past | comments | ask | show | jobs | submit login

Agree on the functional bit.

Naming things: I try to not think about it for more than 10 seconds, and go with the best I've got by then. I find myself renaming things sometimes, and I'm eager to do this when a better name comes to me.




I use the thesaurus that comes with macOS whenever I think of a name and it just doesn't feel right. Then I typically find a more fitting name after spending 20 seconds looking at near synonyms.


I did try that. That is how I ended up with 50 "Manager" classes in my app.

At that point, it is a cognitive burden to handle so many "managers".


Shakespeare the software architect: "First kill all the Managers".


Before we shuffle off this mortal stack.


Yes this. Naming is an intuitive thing, you can't force it, and it will get in the way, moreover, it's fluid and won't matter until later, things could change.

Just name it whatever and come back to it when it starts to matter more and you've probably thought of something better by then.


Renaming things is a luxury only enjoyed by people who don't have other people using their code downstream. Once people have used it, renaming things becomes a breaking change others in your organization will oppose.


Or hopefully your code reviewer suggests names that are better if your choice doesn't make sense


That is true. I am also the code reviewer at this time, but I do perform code reviews.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: