Robust Programs Flashcards

1
Q

What are two defensive design considerations?

A

Anticipating misuse
Authentication
Input sanitisation

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

What is anticipating misuse?

A

Planning ahead to take steps against potential misuse

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

What is authentication?

A

Ensuring only authorised can gain access to the system

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

What is input santisation?

A

Cleaning up unwanted data (e.g. changing cases)

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

What is input validation?

A

Checks if data follows a criteria

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

What is range check?

A

Checks if data is within a certain range

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

What is format check?

A

Checks if data is entered in a certain way (e.g. DD/MM/YY)

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

What is presence check?

A

Checks if data has been entered

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

What is type check?

A

Checks if data is a certain type

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

What is length check?

A

Checks if the length of input is within a certain amount

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

What are the main ways to make a program more maintainable?

A

Indentations
Sub programs
Comments
Naming conventions

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

What is the use of indentations?

A

Makes the program more maintainable by improving the readability by showing each ‘block’ of code

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

What is the use of sub programs?

A

Makes the program more maintainable by making it easier to read, debug + code

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

What is the use of comments?

A

Makes the program more maintainable by making the code easier to understand

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

What is the use of naming conventions?

A

Makes the code more maintainable by making variables more understandable (score = int(input…

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

What is the purpose of testing?

A

Ensures the program works correctly no matter what the user inputs

17
Q

What is iterative testing?

A

Testing the program whilst coding it

18
Q

What is final testing?

A

Testing the code once it has all been coded

19
Q

What is a syntax error?

A

A mistake in the grammar/ spelling of the program (program isn’t able to run)

20
Q

What is a logical error?

A

A mistake made by the programmer (program still runs)

21
Q

What is test data?

A

Data used to test if the program works correctly

22
Q

What is normal data?

A

Data that the program should accept and process

23
Q

What is boundary data?

A

Data at the extreme boundary of data ranges

24
Q

What is invalid data?

A

Data of the correct type but doesn’t meet validation rules

25
Q

What is erroneous data?

A

Data of the wrong type that the program shouldn’t accept and can’t process