News for hackers. Stuff that matters.
Re:The Anti-If Campaign by tptacek on Thursday June 25, 2009 @12:01PM (#673882)
"Oh, I see the problem right here, Mr. Client. Your previous consultant used 'if' statements. Here, let me replace that function with 80 new class files. You'll be much more agile!"
Re:The Anti-If Campaign by stcredzero on Thursday June 25, 2009 @12:13PM (#673911)
I find that the opposite is true: replacing lots of runtime type identification with polymorphism results in placing repeated code in just one place. Don't Repeat Yourself is more agile. Even better: wait until at least the 3rd repetition before refactoring. (But don't wait too long.) This cuts down a lot of unnecessary coding, and leaves the programmer some leeway for good judgment.