2.3 Producing robust programs Flashcards

1
Q

Defensive design

A

the practice of planning for contingencies in the design stage of project or undertaking

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

Anticipating misuse

A

the ability of a programmer to consider how the end user might accidentally (or on purpose) break the program and then write additional code to handle these situations

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

Authentication

A

Verifying a user identity before they can use a program with a username and password

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

What must a strong password have? (authentication)

A

they must be over a certain length with symbols and mixed case are advised

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

Input validation

A

ensuring data input by the user meets the specific criteria before processing

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

Examples of input validation (5)

A

range check, type check, presence check, format check and length check

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

Maintainability

A

a selection of techniques and methods that make code easy to debug, update and maintain

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

Naming conventions

A

many programmers use certain naming conventions for their variables/ procedure names

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

Indentation

A

this makes it easy to see where structures begin and end
conditions and iterations should be indented
code inside procedures and functions should be indented

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

Commenting

A

this is used by programmers to explain sections of code which make it easier to understand the program
the comments are ignored by the complier

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

Testing

A

this is testing the program under various conditions to make sure it is going to work
you need to think about what devices it could be used on and what might cause the rash

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

Iterative testing

A

each module is tested while it is being developed

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

Final/ terminal testing

A

testing that all the modules of the program work together as expected
checking the program meets the expectations of the user with real data

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

Syntax error

A

when the rules of the language have been broken so the program will not run

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

Examples of syntax error

A

variables not being declared before use
incompatibility of variable types

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

Logical error

A

the program runs but does not give the expected output

17
Q

Examples of logic error

A

division by zero, infinite loop, memory full, file not found

18
Q

Test data

A

values used to test a program, includes normal test data, boundary test and erroneous test data

19
Q

Test data : normal

A

data applied to a program which you would expect

20
Q

Test data : boundary

A

data supplied to a program which is designed to test the boundaries of a problem

21
Q

Test data : invalid

A

data of the correct type but outside accepted validation limits

22
Q

Test data : erroneous

A

data of the incorrect type which should be rejected by a computer system