What do you prefer to use and what is the best practice – to make long but very meaningful names or to make shorter ones?
For example, if you are writing a class House, will be
int numberOfRooms;
or
int nRooms;
Sure, long names are better for understandig when you read foreign code or give yours to somebody, but they make code longer -> more complicated to read. So I messed up with it. 🙂
One of the most important things is understanding code.
It’s better to name the variable numberOfRooms or numOfRooms than nRooms – nRooms could mean something else and numOfRooms is just 4 characters longer – so, I think, it worths to name it a little longer.