re: Why doesn't my code work? VIEW POST


There are some useful tips in there, but the most important step is missing. Write an automated test to reproduce the bug before fixing it. This should replace step 1). Then, step 8) would be TDD, rerun the test and change your code until it works.
This is really important to make sure you won’t have any regressions. A good test suite is especially important when trying to find a bug. You usually try a lot of stuff, changing code here and there. From time to time, you forget to revert something and there it is, your regression.

code of conduct - report abuse