Respuesta :
The process involves in finding bugs as well as crushing them in a debugging process is extensive and this can consist of following process;
Examination of the error symptoms
identifying the cause of it
fixing of the error.
This process is usually required a large amount of work, Although no precise procedure that is set in for fixing all error, but some useful strategies that use in reducing the debugging effort.
- One of the significant part of this process is localizing of the error, which is figuring out the cause as well as the symptoms. Strategies that I have learnt in finding and fixing the error in the process of debugging includes;
- Incremental as well as bottom-up program development; development of the program incrementally remains one of the most effective ways that can be used in localizing the error, often testing as the piece of code is added, so with this it will be easier to find the error since any error is from the last piece of code added.
- And also since the last fragment of the code will be small then searching for bugs won't take much time to find and debug.
- Bottom-up development helps in maximizing the benefits that comes from incremental development.
- With bottom-up development, after successful testing of a code, it's behavior will not change once another piece is added to it, since existing code will never replied on new part so it will be easier to trace error in the new code and fix it.
- Instrument program can be used to log information and there can be insertion of print statements.
- Instrument program using assertions; Assertions can be used in checking if the program actually maintains the properties or those invariant that the code relies on,
- Because the program will definitely stops once the assertion fails, and there is actuality that the point where the program reached and stops is closer to the cause, as well as good indicator of how the problem looks like , then the bug can then be fixed.
- breakpoints can be set in the program as well as stepping and over functions, then watching program expressions, as well as inspection of the memory contents at a particular point during the execution can give the needed run-time information.
- Backtracking: this option works in a way whereby one will need to start from the point that the problem occurred then go back through the code to to detect the issue, then the bug can then be fixed.
- Binary search: this is exploration of the code by using divide and conquer approach, so that the the bug be pin down quickly.
Therefore, Bugs are treat to programs and they can be dealt with using discussed methods.
Learn more at: https://brainly.com/question/15289374?referrer=searchResults