2.3 Producing robust programs Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Defensive design

A

Thinking about problems that could potentially occur and preventing them before they happen
-anticipating misuse - thinking about ways users could cause program to fail accidentally or deliberately
-authentication - process of establishing user’s identity (username/ password, biometrics)

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

Input validation

A

Process of checking data when it is entered to see if it conforms to a rule
-data verification - process of ensuring the user types what they intended (entering email address twice)
-input sanitization - checks and modifies any input before passing it on to the next process (changing the case)

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

Maintainability

A

Make program straightforward to understand and modify
-indent program structures in the code
-add comments
-use meaningful variable names
-use subprograms
-whitespace - make code easier to read

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

Purpose of testing

A

Ensure program functions as expected
-iterative: testing during program development (each module works)
-final/ terminal: testing after program is finished (make sure all assembled parts of the program work together)

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

Syntax error

A

When rules of the programming language are broken
-variables are not declared, incompatibility of data types, keywords misspelt

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

Logic error

A

The program runs but does not give expected output
-Conditions and arithmetic operations are wrong

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

Test data types

A

Normal inputs - Data which should be accepted by a program without causing errors
Boundary inputs - Data of the correct type which is on the edge of accepted validation boundaries.
Invalid inputs - Data of the correct type but outside accepted validation checks
Erroneous inputs - Data of the incorrect type which should be rejected by a computer system

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

Refining algorithms

A

Improve the code
-fix the problem
-make code more efficient or maintainable

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