Producing Robust Programs Flashcards

1
Q

What are defensive design considerations?

A

Anticipating misuse, validation, verification, authentication, maintainable code

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

Input validation

A

A process to check that data is reasonable before it is accepted.

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

What is Range check?

A

Checks data within a certain range.

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

Whats type check?

A

Checks data is a certain data type.

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

Whats prescence check?

A

checks that data has been entered and not left blanck

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

Whats lookup table?

A

A table of acceptable entries, also known as a list

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

Maintainability

A

Programs should be written in a way that makes maintaining and understanding them straightforward.

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

Examples of maintainability

A

Using subprograms to reuse code and make them easier to test

Appropriate variable names

Using indentation to improve readability

Comments enable a programmer to understand the purpose of each line of code

Using constants to keep code consistent and easier to read and debug

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

Whats the purpose of testing?

A

To ensure that a program works correctly no matter what the user has input.
Also to ensure the user requirements have been met, errors have been removed and the program doesn’t crash while running

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

Iterative testing

A

Takes place during program development

The programmer develops a module, tests it and repeats this process until the module works as expected

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

Final testing

A

Also known as terminal testing

Takes place after development and before the program is released to the end user

Takes place once all modules have been individually tested to ensure the whole program works as expected

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

Syntax error

A

A mistake in the grammatical rules of the programming language, e.g. incorrect spelling of a command word or print(“hello”(

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

Logical error

A

A mistake made by the programmer. Program runs without crashing but will display the wrong answer e.g. incorrect calculatioon symbol

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

What are the four types of test data?

A

Normal data
Boundary data
Invalid data
Erroneous data (data of wrong type that program cannot process and wouldn’t accept)

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