U4: Debugging and Validating Data Flashcards
1
Q
Trial and Error
A
- Good for programming as cost of failure is low
- Takes little time and money, low stakes
2
Q
Rule of Ten
A
- Trial and error cheaper in earlier stages of Software Development Life Cycle
- Error costs x10 more to fix at each next stage
3
Q
Iteration
A
Continually trying solutions, refining each one, getting closer to end goal
4
Q
Run-Time Error
A
- Occurs when program crashes
- Can be caused by dividing by 0, opening nonexistent file
5
Q
Syntax Error
A
- Mistake in writing code
- Ex: Missing variable, forgetting curly bracket
- AKA: Compile Time Errors as they’re caught while compiling
6
Q
Logic Error
A
- Program runs but output incorrect
- Can cause run-time error as well
7
Q
Top-down Design
A
Solution where problem broken down into smaller and smaller sub-problems until each can be solved in few steps
8
Q
Variable Inspection
A
Visualizers inspect values of objects
8
Q
Visualizers
A
Allow to see how code executes step by step
9
Q
Data Structure Visualization
A
Visualizers include tools for visualizing data structures (ex: arrays, lists, trees, graphs).
10
Q
Tracing
A
- Outputting values of variables during program
- Delete output statements when program debugged
11
Q
Test Data
A
- Should have wide range of input data
- Include different data (ex: 0, decimals instead of strings)
11
Q
Test Plan
A
- Includes aspects of program tested
- Outcomes of test (positive or negative and details to errors)
- Changes made to program
12
Q
Data Validation
A
Checking to ensure data entered is expected
12
Q
try… catch command
A
- “try” command tries algorithm that may cause crash
- “catch” command catches problem, stopping catch