Defensive Dsesign Flashcards

1
Q

what is the purpose of defensive design

A

to ensure programs are functioning properly

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

what will programmers try to do to protect their programs using defensive design

A
  • anticipate how users might misuse the program then try to prevent it
  • ensure their code is well maintained
  • reduce the number of errors in the code through testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is the easiest way for a user to intentionally or accidentally misuse program

A

through entering data

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

what are the two ways you can prevent users from entering something you dont want them to

A
  • input sanitisation

- input validation

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

what is input sanitisation

A

removing any unwanted characters before passing the data through the program

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

what is input validation

A
  • checking data meets certain criteria before passing it through the program
  • such as checking whether an email hasan @ symbol or a suitable ending like .com
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what are the different types of validation input checks you can use

A
  • range check
  • presence check
  • check digit
  • format check
  • look up table
  • length check
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what does a range check do

A

checks data is within a specified range

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

what does a presence check do

A

checks the data has actually been entered

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

what does a check digit do

A

checks numerical data has been entered successfully

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

what does a format check do

A

checks the data has the correct format

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

what does a look up table do

A

checks the data against table of acceptable values

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

what does a length check do

A

checks the data is the correct length

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

what does authentication do

A
  • confirms the identity of the user
  • before they are allowed to access eices of data or features of a program
  • such as using passwords
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what ways are used to increase the securtiy of password authentication systems

A
  • force users to make strong passwords and change it regularly
  • limit the number of failed authentication attempts before access to the account is lost
  • ask for a random selection of characters from the password on each authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are the disadvantages of being too over the top with authentication

A
  • it may affects a programs functionality

- and put people off of using it