Midterms Flashcards
Process of identifying and rectifying errors in a program
Debugging
Typical debugging process
- Examining error symptoms
- Identifying the cause
- Fixing the error
Fully understand the problem before making changes
Understanding the problem
Works backward through the code to find out how it happened.
Backtracking / Backward Debugging
Can give insights into how the code functions
Debugging Tools
Example of debugging tools
Chrome DevTools, Testsigma, dbForger
The point in the code to temporarily stop the execution of the program to inspect the state of its functionality.
Breakpoints
To manually move through each line of code
Stepping
Code is divided into
halves and systematically narrowing the bug location.
Binary Search
Analogy for explaining an object like a rubber duck to someone else
Rubber Ducking
Log Analysis
Group error reports into classes of related bugs as they often share common causes or patterns
Clustering Bugs
Documenting the process and the solutions
Take Notes
Unexpected or error condition encountered in programming
Exception
object-oriented techniques that manage or resolve errors
Exception Handling
Unplanned exception occurs during a program’s execution
Runtime Error
Unplanned exception discovered during program compilation
Syntax Error
represents more serious errors that a program usually might not recover from
Error class
Represents less serious errors that indicate unusual conditions that arise
Exception class
The base class for exceptions thrown while accessing data from files
IOException
Only detected during the execution of the application.
RuntimeException
Raised whenever a wrong mathematical operation appears
ArithmeticException
Thrown when an index used in arrays, lists, or strings is invalid.
IndexOutOfBounds
Indicates that an array has been accessed with an illegal
index
ArrayIndexOutOfBounds