Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I definately agree with 'it will be easy to read and easy to change'. But nowadays it seems almost like a crime to put more than one 'if' in a method. Commented May 28, 2015 at 20:01
  • Also the code seems so 'procedural', which also seems to be a bad habit. Commented May 28, 2015 at 20:02
  • All the patterns-, TDD-, unit test etc. books never seem to cover these kind of problems imho, and I can't relate this 'big if block' to the clean Calculator.Add() clean code.... Commented May 28, 2015 at 20:03
  • No I wouldn't recommend it for 'normal' things, just where you have been told the exact logic rather than the required results, or have some logic which needs to be defined by users. if you see what i mean Commented May 29, 2015 at 9:36
  • 1
    I really like your update. It provides me with a lot of info why other methods (which we might think of) are not the best idea. Commented May 29, 2015 at 10:34