2.3 Programming Robust Programs Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Define defensive design

A

Defensive design helps to ensure programs function properly. This means that programs should never break or produce errors.

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

Define anticipating misuse

A

Anticipating misuse involves thinking ahead about how users might misuse the program. They will then design the program to prevent this happening. Preventing too many entries of a
password to make it harder for hackers to guess

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

Define authentication

A

Authentication can confirm the identity of a user before they’re allowed to access particular data or programs.

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

Define input validation

A

Input validation is checking that the data meet certain criteria before passing it into the program e.g. checking that an email address contains an @ symbol.

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

Define maintainability

A

Well maintained programs make it easy for other programmers to understand your code. This can include using sub programs, comments, indent, clear naming.

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

Define syntax error

A

When the compiler or interpreter does not understand something you have typed, because it does not follow the rules or grammar of the programming language.

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

Define logic error

A

When the compiler or interpreter is able to run the program, but the program does something unexpected.

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

Define iterative testing

A

The program is tested while it is being developed. Often a programmer will test a module, fix any errors and then test it again.

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

Define final testing

A

Final testing – the program is tested at the end of the development process. The whole program is tested at the same time to check it is all working.

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

Define test plan

A

The test plan will outline exactly what you are going to test and how you are going to test it. Good test plan will anticipate all potential issues with the program

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

Define normal data

A

Data that the user is likely to input into the program.

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

Define boundary data

A

Values at the limit of what the program should be able to handle.

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

Define invalid data

A

Inputs with the correct data type that should be rejected by the program.

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

Define erroneous data

A

Inputs with an incorrect data type that should be rejected by the program.

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

Range check

A

A number or date is within a sensible or allowed range

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

Type check

A

Data is of the right type e.g integer

17
Q

Length check

A

Text entered is not too long or too short

18
Q

Presence check

A

Checks that data has been entered

19
Q

Format check

A

Checks that the format is correct e.g email address or postcode

20
Q

What is validation?

A

Ensures data entered is sensible, reasonable and allowed

21
Q

What is verification?

A

Double checks that the data has been entered correctly

22
Q

Password routines

A

Once an ID and password has been entered it is looked up in a database. If the ID cannot be found, an error message is displayed.

23
Q

Why are programs maintained?

A

Improve code, add new features, fix bugs

24
Q

What makes a program maintainable?

A

Sub programs
Appropriate naming conventions
Indentation
Commenting

25
Q

Why are sub programs used?

A

Take inputs and return a necessary value, allowing them to be reused multiple times within the main program. They include functions and procedures.

26
Q

Why are appropriate naming conventions important?

A

Makes the code easier to read and understand, includes appropriately named functions, procedures, variables and constants.

27
Q

Why is indentation important?

A

Helps to see which lines of code are part of which structure

28
Q

Why are comments important?

A

Helps other programmers to easily understand what is going on in the code

29
Q

What are comments usually written for?

A

Parts of a program or algorithm that are difficult to understand, at the start of a function or procedure,

30
Q

What are comments not usually written for?

A

Every line, to explain obvious parts of code, to explain syntax

31
Q

Verification

A

Checking whether data has been entered correctly e.g double entry

32
Q

Input sanitisation

A

Cleaning up data that has been input

33
Q

Validation

A

Checking whether input data follows criteria

34
Q

Maintainable code

A

Allowing other programmers to understand the code

35
Q

Lookup table

A

A table of acceptable entries