Sameer Borate’s Blog: Refactoring 1: Consolidating Conditional Expressions

Sameer has posted the first article in his “Refactoring” series today – a look at boiling down conditional expressions to only the logic that are really needed (and maybe replacing it all together).

Many times you see a group of conditionals where the returned values are the same. To make the code cleaner you can group [...]