Re:Is anybody else using ridiculously long variable names?
by bahmboo on Wednesday August 17, 2016 @11:30PM
(#12310253)
Yes, more so when they are used infrequently e.g. maxAllowedInvalidAuthenticationAttempts. Autocomplete is your friend. I try to make it very explicit and not just a long word bag. I use short generic names when context is obvious: index, count, max, min.
[ Parent
| on HN ]
Re:Is anybody else using ridiculously long variable names?
by joshka on Thursday August 18, 2016 @04:57PM
(#12316260)
Being somewhat pedantic here, but do you need 'max' in that? Also, perhaps even 'Invalid' is unnecessary as regardless of the last attempt being invalid or valid you're going to let the user attempt it. e.g. say this number is 3, you're going to stop authenticating at either 3 fails, or at 2 fails then a success (because the person is authenticated). ;)