3 ms·
They are, and that's where the bugs can come from. :) It leads to a situation where it's easy to come back to the code in the future (or have a new developer wo
by majormajor 14y ago
They are, and that's where the bugs can come from. :) It leads to a situation where it's easy to come back to the code in the future (or have a new developer working on it) and see a field that's a boolean and make an assumption like "well, this is a boolean, so if it's not True than it's False." I like to make my booleans not-null so that they're, well, actually booleans, and leave stuff with three or more states to enum-like behavior.
- whit537 14y agoYeah, maybe should've gone with an enum. I end up doing "is_suspicious IS NOT null" etc.
- groby_b 14y agoOr you could just admit that it's lots of grays and use an actual number. [0..1] for a trust scale. Trust _never_ is binary. (It also rarely is one-dimensional. But that's a different story... You might get away with one dimension, since it's restricted to a very limited set of interactions)
- whit537 14y agoGood point. I was trying to get something going quickly. I expect the system to continue evolving.