you are viewing a single comment's thread
view the rest of the comments
[–] 7 points 3 years ago (1 child)

I have a convention to correlate the size of variable scope with its name length.

If a variable is used all over the program, it will be named "response". If it is <15 lines, then it can be "res". If it is less than 3 lines, it can be only "r".

This makes reading code a bit simpler, because it makes unimportant, local vars short and unnoticeable.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 3 years ago (2 children)

    Why though? Intellisense helps you write out the full name. And instead of response why not call it whatever the data you're expecting to be

  • source
  • parent
  • hideshow 4 child comments