r/dailyprogrammer • 1 3 • Jul 28 '14

[Weekly #4] Variable Names

Variable Names:

We use variables a lot in our programs. Over the many years I have seen and been told a wide range of "accepted" use of names for variables. I always found the techniques/methods/reasons interesting and different.

What are some of your standards for naming variables?

Details like are they language specific (do you change between languages) are good to share. Or what causes the names to be as they are.

Last Week's Topic:

Weekly #3

26 Upvotes

64 comments sorted by

View all comments

Show parent comment

7

u/Whadios Jul 29 '14

Have you ever in that time needed to search and replace the counter var in a loop? I've been coding for 20 years and don't think I've ever ran into a case where I wanted to do a search and replace like that.

For one loop code that uses the counter is rarely ever long enough that changing it would be hassle. Secondly most IDEs should support refactoring.