4 ms·
> the 'p' in function f means something completely different from the 'p' in function g. And that's OK. The 'x' in mathematics means completely different thin
by enriquto 8y ago
> the 'p' in function f means something completely different from the 'p' in function g.
And that's OK. The 'x' in mathematics means completely different things depending on the equation.
That's what comments are for, to explain the meaning of the local variables on each function.
// E: energy of the thing
// m: mass of the thing
// c: constant representing the speed of light in vacuum
E = m * c^2
I cannot read multiple-letter variables without unconsciously interpreting them as the product of several single-letter variables. It requires a lot of conscious effort that obscures my understanding of the code.
- _carl_jung 8y agoI suppose you have the same problem when reading this comment too.
- enriquto 8y agono, I do not mistake regular text with mathematical formulas. My problem is that I read code as if it was mathematical formulas.