When you choose names for things in programming you can use anything. You could call everything by real names (Fred, John etc.) but that might get confusing! Instead you will probably already be choosing names which mean something to you. Here are some tips to help you choose good names. You don't have to do anything the way others do but you should at least be consistent and follow some rules which suit you.
Capitals, spaces and special characters
You cannot use every character on your keyboard. Some are reserved for special uses by programming languages. The easiest approach is to just use text and numbers. Some special characters are generally OK but don't take the risk. The underscore is fairly safe to use if you really want to but definitely NOT the space character.
When naming something pick a name which describes what the item is. For example a variable called "colour" is immediately clear to anyone looking at the code. However descriptive names get more confusing as they get longer. For example, "frontdoorcolourchoice" is a bit harder to read. To allow for that many programmers will capitalise the first letter of each "word" in the name: "frontDoorColourChoice". It is vital to stick to this if you do because most languages consider C and c to be totally different. The easiest way is to just use lower case but you may regret that approach later.
Objects are often named with capital first letters to distinguish them from variables or function names. As it is not always obvious what is an object and what is a variable you can probably ignore this distinction for now.
Efficiency v. understanding
If you call functions or variables by names which suggest what they do. For example, showMenuItem(). However, every character in that name has to be sent from the server to the user's browser. For a small site this is not important but on a site with millions of hits a day each character counts and changing the name to s() could save megabytes of bandwidth every day.
The compromise is to use sensible names during development. Then do a find and replace to change them all to shorter, more efficient names before deploying them to the site.
Reserved words
Programming languages use certain words with special meanings. For example IF or BREAK. You can't use these as variable or function names without potentially causing problems. If a script acts strangely the check whether you have accidentally used a reserved word.



