2.3 Robust Programming Flashcards
1
Q
What are examples of defensive design features?
A
- Authentication
- Verification
- Validation
2
Q
What is authentication?
A
- Checking correct user is entering a system
3
Q
What is verification?
A
- User input correct data
4
Q
What is validation?
A
- Correct format
5
Q
What is input sanitation?
A
- Filtering input data
- Remove potential malicious code / SQL injection risk
6
Q
How can code be made more maintainable?
A
- Comments
- Indentation
- Appropriate variable names
- Subprograms
7
Q
What are ways to create appropriate variable names?
A
- snake_case ( underscores )
- camelCase ( capitals )
8
Q
What are features of IDE?
A
- Syntax highlighting
- Error diagnostics
- Run time environment
- Editor
- Translator
9
Q
What are the advantages of IDE?
A
- Syntax highlighting ; more readable
- Error diagnostics ; finds bugs
- Run time environment ; see program change
- Editor ; write code
- Translator ; saves time
10
Q
What are the two types of testing?
A
- Iterative ( subprograms)
- Terminal ( entire code )
11
Q
What are the three types of test data?
A
- Valid
- Extreme / boundary
- Invalid / erroneous
12
Q
What is valid data?
A
- Sensible
- Processable data
13
Q
What is extreme data?
A
- Falls at the boundary of possible ranges
14
Q
What is invalid data?
A
- Erroneous
- Cannot be processed