What's in a Name: Java Naming Conventions - DZone Java
You should use proposed conventions for every program, whether it be small and simple or big and complex. There are times when you couldn't decide the name for your class, method, or anything else. There is a trick that can help you to make a name for it that I often use:
- Just give 5 seconds and no more than that to decide the name.
- If the name doesn't come to you, then just press any key on the keyboard (a-z only) for the name, like dgsjsbdjdb — just give it any unreadable name.
- Finish up your method or class.
- Then, think about the name again and change it from the temporary, unreadable one.
- If it still doesn't come to you, then divide and conquer. One of the reasons you may not be able to decide the name is that too many things are going in a single place. Just make it do one thing at a time. And name that thing along the way.
- Repeat for all the others.
Read full article from What's in a Name: Java Naming Conventions - DZone Java
No comments:
Post a Comment