upvote
Wouldn’t a view count with range filtering provide the best flexibility?
reply
Absolutely, I was purely reacting to the "not". Every variable named not-something will lead to difficult-to-read code with double-negation like "if (!isNotSomething()) {...}".
reply
why, though? the current version is the interesting property
reply
There's a rule of thumb somewhere that booleans should always be named / represent something positive, so "enabled" instead of "disabled", "visible" instead of "hidden", and "has_been_viewed_much" instead of "has_not_been_viewed_much".

see e.g. https://codehealth.dev/prefer-positive-booleans/

reply
They meant that a more ergonomic name would be "has_been_viewed_much", so you can filter by the inverse and still get the same result, but with a better name
reply
I know what they meant, I was saying that imo the ergonomic name is has_not_been_viewed_much. it's directly expressing the property you are interested in, as opposed to expressing the negative property and comparing it to false.
reply
How about rarely_viewed? Such expresses the property of interest, avoids the double negative issue, and is shorter?

Of course rarely might imply a frequency much lower than the cutoff and infrequently has a bit of the double negative issue. Tradeoffs.

reply