defensive design Flashcards

1
Q

what are the defensive design encompassing areas?

A

-protection against unexpected user
inputs
or actions, such as a user entering a letter where a number was expected
-maintainability - ensuring code is readable and understandable
-minimising/removing
bugs

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

what is the anticipation and protection is done through?

A

-validation

-sanitisation

-authentication

-maintenance

-testing

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

how do you do a length check?

A

len()

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

how do you do a range check?

A

range()

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

what can be done in order to make a program more maintainable?

A
  • use of subprograms
  • naming conventions
  • indentation
  • commenting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly