Have you failed a job interview?
Send us your job interview questions and get correct answers.

BP5: Do not use short variable names

Do not use short vaiable names except those with generic use (s for string, c for char, i for integer). The readability has higher priority than the speed of initial typing. We have intellisense so later it doesn't matter that variable is longer. It however simplifies reading and makes the code self-commenting.

Examples of how not to do it:

var res = service.GetFileData();

Now is it a response or a result? You could argue that if var wasn't used, it would have been obvious. But var isn't the problem. Incorrect naming is. 


 

Comments

No Comments Yet.
Be the first to tell us what you think.

Download Better Coder application to your phone and get unlimited access to the collection of enterprise best practices.

Get it on Google Play