Monday, June 06, 2005

Strategy 3 - A bunch of Ifs

If you see too many ifs in your code and if you can't understand it and if the ifs are used all the time (you get my point)...

Refactor. Maybe subclassing or delegation will help. Look at what the ifs are operating on - if they are on another object you probably need to move responsibility to another object.

0 Comments:

Post a Comment

<< Home