I also am constantly changing names.
This seems to be a huge amount of time wasted, is there a way to become "good" at naming things in software?
You are already doing it right: You actually think about naming.
What helps me is to name variables very simple and clearly wrong, code a little bit to see where it brings me and then it becomes much easier and much clearer to name them right.
By the way, this implies that, if there are group conventions, use them.
$dbname might be for the name in the database. $dbpass for password. $dbipddr logging of ip address. $dbdark might be a setting for light or dark theme.
In the databasae, it's just named as Name, Pass, IPAddr, DarkTheme or whatever. I've very rarely ever had to change names. But before I even start a project, I outline not only what the project is going to do, but how the database will look and function as well.
Yes, that's how learning works. You're doing it right :)
- class responsibility collaborator
- John Osterhout a Philosophy of Software Design
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.