Producing Robust Programs Flashcards

1
Q

How do programmers protect their programs

A

Testing - to reduce the number of errors
Prediction of how users may misuse their program and maintaining programs.

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

Input sanitisation

A

removes any unwanted charecters

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

Input Validation

A

Checks it the data is valid and can be passed into a program

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

Presence Check

A

Checks to make sure data has been entered.

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

Length Check

A

Checks if the data is the correct length

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

Range check

A

checks to see if the data is within the correct range

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

Format check

A

Checks it is in the correct format

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

Check digit

A

checks to see if numerical data has been entered correctly.

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

Look up table

A

Checks against a table of accepted values

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

Authentication

A

Where a program confirms the identity of a
user before giving them access to the full program. This could
be done through usernames and passwords.

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

Maintainability

A

Well maintained code is easy to edit without making any errors.
Good code will contain: comments, appropriate names for variable and subprograms and indentation.

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

Why test a program

A

To make sure there are no errors

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

Final/ Terminal Testing

A

The program is tested in one go at the end of production

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

Iterative testing

A

The program is tested at regular intervals that means that it is made sure that the program is working all the time.

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

Types of Test data

A

Normal - Normal data
Boundary - Data close to the edge
Erroneous - data outside the limit

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

Syntax error

A

something which doesn’t fit the
rules or grammar of the programming language.

17
Q

Logic Error

A

the program runs but not as
expected. Eg: < user instead of >.