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
2
Q
what is the anticipation and protection is done through?
A
-validation
-sanitisation
-authentication
-maintenance
-testing
3
Q
how do you do a length check?
A
len()
4
Q
how do you do a range check?
A
range()
5
Q
what can be done in order to make a program more maintainable?
A
- use of subprograms
- naming conventions
- indentation
- commenting