Mindmap
2.3 Producing Robust Programs
Inhalt der Mindmap
2.3 Producing Robust Programs
Input Validation
- Check made to see if data entered is reasonable
- Examples: Length check(check if it is the right length), Range check(data is in the specified range) and Presence check(check data is entered into a field).
- Check made to see if data entered is reasonable
Input Sanitisation
- removal of unwanted characters
Maintainability
- Programs need to be up to data so they are defensive against attacks
Indentation
- code is indented to group together a function
- and to make code easier to read
- code is indented to group together a function
Comments
- inform readers of bugs
- explain code
- and stop a line of code from executing
- explain code
- inform readers of bugs
Defensive Design
- An approach to software development that produces robust programs
- Anticipating misuse
- Writing maintainable code
- Testing the code with reliable test data
- An approach to software development that produces robust programs
Robust VS. Reliable
- Robust programs
- handle unexpected inputs without crashing
- Reliable programs
- work as intended under any conditions
- Robust programs
Anticipating misuse
- Malicious inputs could hijack a system but input validation and sanitisation prevent this
- Using a firewall prevents access from outsiders
Types if validation check
- Type check
- tests the type of data entered like string and boolean
- Range check
- tests the data falls in a specified range
- Presence check
- checks if data required is present
- Format check
- checks if data is meets the right format
- Length check
- tests that the number of characters entered is in the allowed range
- Type check
Authentication
- checking a person is authorised
- like username and password
- checking a person is authorised
Syntax errors
- mistakes in the way the code is written
- program wont run
- mistakes in the way the code is written
Logic error
- mistakes in the logic of a program
- program will still run but outcome may be different
- mistakes in the logic of a program
Run time errors
- errors that occur when the program is running
The purpose of testing
- Bugs are errors in the software
- bugs are mistakes
- the purpose of testing is to check the program works under good conditions and cope with errors
- Iterative testing
- the testing of code as it is written
- Final/terminal testing
- testing the program once all the code has been written
- Bugs are errors in the software
Types of test data
- Valid data-correct data
- Extreme data
- Valid data-correct data
Informationen
- Beschreibung
- GCSE Computing Mindmap am 2.3 Producing Robust Programs, erstellt von Sophie Lincoln am 12/03/2019.
- Erstellt von
- Sophie Lincoln · Mär 2019
- Aktualisiert
- 25 Mär 2019
- Aufrufe
- 1
- Bewertung