Encapsulate Conditionals

Logic contained in if/for/while cases should be logically clear. For example

if (shouldBeDeleted(item))

is much clearer than

if (timer.hasExpired() && !timer.isRecurrent())

Additionally, prefer positive to negative conditionals (e.g. isFalse() instead of !isTrue() as the exclamation point is small and has a possibility of being missed by the reader.



bj 2019-09-22