Naming variables has always been a source of debates around developers. The general idea is that you should pick a name as short as possible, but long enough to provide meaning, one which would be self-explanatory, for which you needn’t browse the code to understand what it’s used for. Studying naming conventions can help. Also, having some specially set within your team is a good idea. Here are some that are quite general: For variables, you should use nouns. Other ideas: with a plural form for arrays; if your variable is a boolean, you should prefix it with is, has,…
The post Thoughts on naming your variables appeared first on draghici.net.
Discover more from WIREDGORILLA
Subscribe to get the latest posts sent to your email.