This article on naming conventions is based on Java, some rules apply to other programming languages as well.
I highly recommend this article to new programmers who are yet to have their own naming styles (for functions, variables, etc).
This is especially useful if you are just starting to learn programming.
If you are a experienced programmer with your own naming styles, you may want read this and see if there is anything to improve your naming techniques.
Original article: http://java.about.com/od/javasyntax/a/nameconventions.htm
Note on meaningfulness and length:
When choosing a name for an identifier make sure it’s meaningful.
Don’t worry about the length of the name. A longer name that sums up the identifier perfectly is preferable to a shorter name that might be quick to type but ambiguous.
There are 4 types of letter cases for naming:
Lowercase is where all the letters in a word are written without any capitalization e.g.
1 [crayon-5f00e8a5c10bd903605330 inline="true" ]while, if, mypackage
Uppercase is where all the letters in a word are written in capitals. When there are more than two words in the name use underscores to separate them e.g.
1 [crayon-5f00e8a5c10c6772427600 inline="true" ]MAX_HOURS, FIRST_DAY_OF_WEEK
CamelCase (also known as Upper CamelCase) is where each new word begins with a capital letter e.g.
1 [crayon-5f00e8a5c10cd654344060 inline="true" ]CamelCase, CustomerAccount, PlayingCard
Mixed case (also known as Lower CamelCase) is the same as CamelCase except the first letter of the name is in lowercase e.g.
1 [crayon-5f00e8a5c10d5979794173 inline="true" ]hasChildren, customerFirstName, customerLastName
Standard Java Naming Conventions:
Basically, follow the naming guidelines below when you write your programs, you will find your programming process more systematic, efficient and professional than if you don’t.
Packages: Names should be in lowercase. With small projects that only have a few packages it’s okay to just give them simple (but meaningful!) names:
12 [crayon-5f00e8a5c10dd127065873 inline="true" ] package pokeranalyzerpackage mycalculator