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.

9
  • 4
    This question probably belongs on Code Review. Commented Aug 14, 2017 at 13:23
  • 2
    Uhm, if that's the case I'll move the question there. I thought this could be the right place given that I'm not really interested in the code, but in higher level ideas to handle this somehow "generic" problem. Commented Aug 14, 2017 at 13:27
  • 1
    @VincentSavard 1) I have a very big set of input-ouput previously calculated to use as test after the refactoring 2) bp(boolean x) was an attempt to build a path to be logged, so that after every evaluation, a bp(true) or bp(false) would be invoked. I forgot to remove some of them 3) original names are more meaningful than that =) Commented Aug 14, 2017 at 13:46
  • 1
    Also beware the insidious if {} if{} combination. They are completely different blocks without any else condition joining them. I've run into too much code that had two if blocks formatted as if they were an else statement. Commented Aug 14, 2017 at 14:10
  • 1
    Possible duplicate of Elegant ways to handle if(if else) else Commented Aug 14, 2017 at 15:06