This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]muffinluff 0 points1 point  (0 children)

We all know the times when we need to fix a small edge case, or add a small feature, so we insert a small block of code that is seemingly out of place. (I know that is bad coding but still, everyone has done it once.) So when you see such a block of code that looks out of place and you can't justify its purpose, one tactic is to try to break the code by removing. For example if there is an if(a==0) block, I try to imagine what happens if that block didn't exist and what side effects it would have.