2.3 Producing Robust Programs Flashcards

1
Q

What is anticipating misuse?

A

Misuse of a program could be deliberate (a hacker trying to get into a system by making it crash) or accidental (a user forgetting their password)

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

What is authentication?

A

The process of a user confirming that they are who they say they are

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

Range check example

A

A number or date is within a sensible/allowed range

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

Length check example

A

Text entered is not too long or too short e.g. between 8-15 characters

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

Type check example

A

Data is of the right type e.g. integer

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

Presence check example

A

Checks that data has been entered i.e. the field hasn’t been left blank

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

Format check example

A

Checks that the format of, for example a postcode or email address, is correct

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

What can validation do?

A

Check that data which has been entered is reasonable

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

What is verification used for?

A

To double-check that data has been typed correctly (human errors)

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

What are some features of subprograms?

A
  • Written so that they can be reused multiple times in the program and easily transferred to others
  • Makes debugging easier as it can be tested and edited separately
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What do naming conventions do?

A

Help to identify variable names by using meaningful and consistent format for them to aid readability

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

What do indentations do?

A

Aid readability so it is clear where iterations and selections start and end

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

What are some features of commenting?

A
  • Help other programmers to understand your code
  • Who wrote it, when and its purpose
  • Comment complex coding sections and subroutines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why is testing needed?

A

To ensure the program functions as expected and meets all requirements. It should be destructive aiming not only to prove the function but also break it

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

What is iterative testing?

A
  • Tests modules and parts of the program for development
  • Errors in each module need to be fixed before moving to the next
  • Tests and retests subprograms separately
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is final/terminal testing?

A

Tests the whole program

17
Q

What is a syntax error?

A
  • The code written doesn’t conform to the rules of the language
  • Will be flagged by translators
  • The program cannot be run until all the syntax errors are fixed
18
Q

What is a logic error?

A

The program will run but not as intended

19
Q

What is normal data?

A

Typical data which the program is designed to handle

20
Q

What is boundary data?

A

Both ends of an allowed range e.g. 1-10 and just outside, 0 and 11

21
Q

What is invalid data?

A

Data of the correct type which should be rejected

22
Q

What is erroneous data?

A

Data of the incorrect type

23
Q

Why do we refine algorithms?

A

To make programs more efficient