Ifs (Booleans and enums)

I am almost always dismayed when I see a method with too many if statements. More often than not, this is a precursor to similar conditions in other methods in the same or other classes, using the same condition to switch the actions to be called. This is an anti pattern I’ve seen repeated at far too many places. I think the¬†anti if campaign¬†mirrors my thought process about what needs to be done. Continue reading

Advertisements