3 ms·
Is there a resource for "help naming stuff"? Naming is hard. Especially so when you dabble in domains you're not learned in. I have almost no math background s
by Waterluvian 6y ago
Is there a resource for "help naming stuff"? Naming is hard. Especially so when you dabble in domains you're not learned in. I have almost no math background so sometimes I really struggle to know what to name things.
My latest example is, "I need to provide a flag to switch if this element is positive or negative. What do I name the flag?" (came up with simply: sign, or polarity)
- JamesSwift 6y agoFor booleans I generally stick to the `isX` format. So in your case, `isPositive` (or `isNegative` depending on your preference)
- Waterluvian 6y agoGood ideas. But I messed up my own example. The one I was reaching for was a flag to set “clockwise or anti clockwise or neither” I was looking for the terminology for clockwiseness
- kazinator 6y agoIn mathematics, by a widely used convention, a clockwise rotation is negative.
- FabHK 6y agoLISP had the convention of appending "p" for predicate: (evenp x) would return true if x was even. So, "positivep". Though, yeah, that would be the name for a function that checks whether the argument was positive, not a flag.
- kazinator 6y agoCommon Lisp calls it plusp.