- Try not too hard to debug a problem, take a break, come back later
- Are you able to explain the problem you are seeing? Can you describe the pattern in which it occurs? Stop looking at the code and try to understand the pattern and possible explanation for it
- Use your friendly debugger or your friendlier console log messages
- Can you narrow down the problem to something simpler
- If you are dealing with numbers - think signed != unsigned
- Are you dealing with garbage data? Garbage data implies faulty pointers or storing more than the capacity
- Do you assert() the code (yourself) frequently enough
- Is this a recently created problem - look at what you changed recently
- Can you simulate what the computer is doing (if you can find the faulty logic in code) on paper or in your mind. If so, there is a good chance of you catching the bug
- Don't solve the same problem twice
I will keep adding to this list as I get more input from all of you or start thinking clearly.
2 comments:
Few points from me:
1) If you can't figure out in 30 minutes, google it.
2) If you can't figure out in 60 minutes, raise hands for help to your colleage.
I have helped so many times and also got help so many times.
Yep, good points.
I need to come up with a newer draft. But the thing is with google you can hit the following
1. You could hit patented/proprietary implementations - which is a potential landmine
2. You need to acknowledge and keep track of copyrights, etc
Post a Comment