2.3 Producing Robust Algorithms Flashcards

1
Q

Robust program

A

A program that is fault-tolerant and difficult to break/crash.

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

Defensive design

A

programs should be designed to be robust and to not crash if a user does something unexpected.

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

Defensive design considerations

A
  • Input sanitisation/validation
  • Anticipating misuse
  • Authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Input sanitisation/validation -

A

validation checks such as length checks and format checks can help to avoid causing errors.

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

Anticipating misuse -

A

assume that users will try to break the program.

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

Authentication

A

using logon systems with passwords to make sure the user is who they say they
are.

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

Iterative testing -

A

testing that is carried out during production.

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

Final/terminal testing -

A

Carried out just before the final program is released.

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

Testing techniques

A
  • Test with erroneous data
  • Test with valid data
  • Test with boundary data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Erroneous data -

A

Data that is not valid.

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

Boundary data

A

Data ‘on the edges’ of being acceptable

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

Logic errors

A

Errors that mean your code works but not as intended e.g < instead of >. These will not be picked up by the IDE.

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

Maintainability

A

Ensuring that code is easy to follow and repair/improve/edit.

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

Ways of making code more maintainable -

A

Comments, indentation, meaningful variable names and use sub-routines.

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