Quote Originally Posted by Paul McKenzie View Post
Another thing you don't do -- don't start moving code around until you've debugged the crash and know exactly why it happened. What I see some coders doing is rearrange some code here and there, and voila, the crash is gone without any explanation. For example, they introduce a couple more variables, or they remove a function, etc. Unfortunately, all that has happened is that the bug was moved to another part of the application, and who knows when it will appear again.
In some cases identifying which types of code movement tend to hide the bug can be helpful for solving it. But I agree----always return the code to the non-working state after such tests, until you have pinned down the cause.