Post
Everybody in #softwareDevelopment wants to scold you for deep nesting, but nobody complains about compound booleans. A statement should not contain more than one boolean operator. It's the #programming equivalent of a run-on sentence. You'll split a whole block of #code into a function just to avoid an indentation but you'll write a statement with a ternary and a couple groupings? GTFO! #webDev #javaScript #software #coding
Ripe Catshark I'm undecided about this. A longer compound boolean takes longer to read, but it shows all the logic in one place. Splitting into many short ones makes each easier to read, but full understanding requires you to piece together the logic, like shards of broken pottery. I'd probably put the cost/benefit cutoff at 3โ€“4 booleans in a statement instead of just one.