Robust Programming Flashcards

(28 cards)

1
Q

What is input validation?

A

Checking input is sensible and correct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Give examples of input validation?

A

Range check type check format check presence check

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a range check?

A

Ensures number is within a defined range

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a type check?

A

Ensures input is the correct data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a format check?

A

Ensures input matches a specific pattern

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a presence check?

A

Ensures a value has been entered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is error handling?

A

Detecting and responding to errors in a program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is defensive programming?

A

Writing code to prevent and handle errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is testing?

A

Running a program to find and fix errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a syntax error?

A

Mistake in code that prevents program from running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a logic error?

A

Program runs but produces incorrect results

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a runtime error?

A

Error that occurs while the program is running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a dry run?

A

Manually walking through code to check logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a test plan?

A

Document describing tests to check program works correctly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a normal test?

A

Test with expected/valid input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an extreme test?

A

Test with input at the edge of allowed limits

17
Q

What is an exceptional test?

A

Test with invalid or unexpected input

18
Q

Why is testing important?

A

To ensure program is reliable and works as expected

19
Q

What is verification?

A

Checking that data has been entered correctly

20
Q

What is validation vs verification?

A

Validation checks input is sensible verification checks data entry

21
Q

What is exception handling?

A

Code to catch and respond to errors

22
Q

What is debugging?

A

Finding and fixing errors in code

23
Q

What is a breakpoint?

A

A marker to pause program execution for testing

24
Q

What is trace table?

A

Table showing variable values at each step of code

25
What is the purpose of comments?
Explain code for human understanding
26
What is code readability?
How easy code is to read and understand
27
What is maintainability?
Ease of updating and modifying code in the future
28
What is the importance of robust programming?
Prevents errors