3 ms·
Don't use single-letter variable names like i, j, k. At least double them, like ii, jj, kk. If you do that then they're easy to grep for.
by polm23 6y ago
Don't use single-letter variable names like i, j, k. At least double them, like ii, jj, kk. If you do that then they're easy to grep for.
- deleted 6y ago[deleted]
- ribadeodev 6y ago..or just do not use variable names smaller than 3 characters if they do not mean anything, period. There is no difference in coding time and no good reason whatsoever.
- polm23 6y agoI generally agree, but I think ii, jj, kk are fine for those iterator ints in loops, or the throwaway var in a list comprehension in Python. The only other situation single-letter variable names make any sense is if you have a short function that implements a mathematical formula, like distance or something.