1/20
Vocabulary practice flashcards covering error classifications, exception handling, the DRIFT debugging method, IDE debugger controls, and alternative debugging techniques from Lecture 10.
Syntax Errors
Errors caused by using incorrect syntax in code. They are usually caught by the code editor, typically prevent the program from running at all, and are relatively easy to find and fix.
Run-Time Errors
Errors that occur during program execution (often called "exceptions") and might not be predictable ahead of time, such as exceeding memory limits or nesting too many function calls.
Recursion
A programming technique where a function calls itself; if it makes too many nested calls, it can cause a run-time error.
Logic Errors
Mistakes in how code works where the program executes but produces incorrect output or fails unexpectedly. Considered the toughest errors to solve, they are the primary source of bugs.
try-except statement
A Python structure used to intercept and handle run-time errors so the program does not crash, providing an opportunity to recover or exit cleanly.
TypeError
A built-in exception raised when attempting to perform an operation on an inappropriate data type, such as adding an integer to a string.
IndexError
A built-in exception raised when attempting to access an index or element that is out of range of a sequence, such as a list.
ZeroDivisionError
A built-in exception raised when an arithmetic division or modulo operation is attempted with a denominator of zero (0).
NameError
A built-in exception raised when attempting to evaluate or access a variable identifier that has not been defined.
Bug
A common computing term for a problem in a program. Traced back to Thomas Edison's "bug trap" in telegraphs, it was famously popularized in 1947 when Grace Hopper found a moth trapped in a relay of the Mark II computer.
DRIFT
A structured five-step debugging framework: Discover (find a repeatable problem), Reproduce (create a reliable failing test case), Isolate (narrow down the code location), Fix (resolve the bug), and Test (verify the fix, ensure no regressions, and check for similar issues elsewhere).
Debugger
A software tool integrated into code editors that assists in locating bugs by controlling code execution and examining memory contents during runtime.
Debug Mode
A specialized execution mode separate from normal mode that builds extra diagnostic information into the executable with reduced optimization, causing code to run less efficiently.
Breakpoint
An execution control marker placed next to a line of code (often visualized as a red circle) that causes the program to pause execution immediately upon reaching that line.
Step / Step-over
A debugger execution control that executes the next line of code; if the line contains a function call, the function executes completely and returns before execution pauses again.
Step-into
A debugger execution control that executes the next line of code, navigating inside any called function and pausing at its first line.
Continue / Run
A debugger execution command that resumes normal program execution until the next breakpoint is reached or the program terminates.
Call Stack
A debugger inspection tool that lists the hierarchy of active function calls (viewed by typing "where"), showing the most recently entered function at the top.
Variable Explorer / Variable Watch-List
A debugger interface tool that displays active variables and their current values in memory, allowing developers to inspect hierarchies and monitor changes.
Rubber duck debugging
A manual debugging technique where a programmer explains code line-by-line to an inanimate object (such as a rubber duck) to identify logic discrepancies between intent and implementation.
assert statement
A sanity-check statement in Python that tests a Boolean expression; if the expression evaluates to False, it halts the program and raises an AssertionError.