Debugging tips

Debugging tips 1. Try to tell someone like your friend or a coworker about what your code is expected to do and how it actually behaves. 2. Be concrete and don't omit details and answers all of your helper questions cause you're likely to realize the problem while you tell your story and speaking activates of these parts of your brain can remain idle during coding but if no one can help you with the problem go check out the Rubber Duck Debugging. 3. Try to isolate the exact part of your code that may be responsible for your troubles and run it separately. You can try commenting out of the code that is obscure of the problem. Assign the concrete values to variables instead of reading them from the input try testing your functions by applying predictable argument values. Analyze your code carefully and try reading it out loud. 4. A bug that has recently appeared and didn't show up earlier try to analyze all of the changes you've introduced into your code. One of them may be the results of your answer. 5. Take a break. 6. Be optimistic you'll find the bug eventually.

Comments

Popular posts from this blog

Operators in C language

3D printers