3 ms·
If you're having trouble naming something, don't just name it `x` or `a` if this is something you're going to have to maintain. Instead, it's a red flag that yo
by mbauman 4y ago
If you're having trouble naming something, don't just name it `x` or `a` if this is something you're going to have to maintain. Instead, it's a red flag that your abstractions are wrong. It's often worth taking some time to figure out if there's a better structure.
- dllthomas 4y agoI think I agree with this, but the initial "if" is definitely doing some of the work and could be unreliable. Names like "x" and "a" and whatnot are just fine if what you're doing is math. You shouldn't feel like you need a "better" name than "x" for the input to the fast inverse square root function. But if the names aren't feeling quite right, then (as you say) absolutely stop and consider why and consider picking something better.