Producing robust programs Flashcards

1
Q

What is the purpose of defensive design

A

Ensures a program runs correctly and continues to run no matter what actions the user takes

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

What is authentication

A

The process of the user confirming they are who they say they are on a computer system

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

How is authentication done

A
  • username + password, bank account number
  • secret answer to a question
  • biometrics, physical identifier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does validation do

A

Helps a programmer ensure that any data input is possible and sensible. It applies rules to the inputted data and if they are not met the data is rejected

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

What are the validation checks

A
  • Range checks
  • Length check
  • Presence check
  • Format check
  • Type check
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of maintainability

A

To ensure that over time a program can be easily maintained and understood

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

How can code be made easier to understand

A
  • Comments
  • Naming conventions
  • Indentations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do comments make code easier to understand

A

Provide information about what different parts of the program does

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

How do naming conventions make the code easier to understand

A

Meaningful variable names reflects the purpose of the variable and the data that it intends to hold

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

How do indentations make the code easier to understand

A

Codes within selections or iterations should be indented, allows the programmer to see which parts of the code falls in the selection or iteration and when it ends

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

What is used in defensive design

A
  • Maintainability
  • Authentication
  • Validation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the two methods that testing is carried out by

A
  • Final (terminal) testing
  • Iterative testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is iterative testing

A

testing carried out while the program is being developed
The programmer writes a second of code then tests it

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

What is final testing

A

testing is carried out once all the modules are complete
the program is tested as a whole to ensure it functions properly

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

What is test data used for

A

to test whether or not a program is functioning correctly

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

Three types of test data

A
  1. Valid data
  2. boundary data
  3. erroneous (invalid) data