Mind map
2.3 Robust Programs
Map content
2.3 Robust Programs
DEFENSIVE DESIGN CONSIDERATIONS
- Input Sanitisation
- removes unwanted characters of an input before using it as data for next process
- e.g. changing the case
- removes unwanted characters of an input before using it as data for next process
- Input Validation
- checks if data meets certain criteria before processing
- e.g. checking that an email has a suitable ending .com
- Types of validation
- type check
- range check
- presence check
- format check
- length check
- format check
- presence check
- range check
- type check
- checks if data meets certain criteria before processing
- Input Sanitisation
PLANNING FOR CONTINGENCIES
- Communication Error
- should enable ways for user to cancel requests or report connection errror
- program can automatically resume when connection is available
- should enable ways for user to cancel requests or report connection errror
- Peripheral Errors
- printer may run out of paper, have a jam etc.
- shouldn't assume printer is always successful
- printer may run out of paper, have a jam etc.
- Disk Errors
- e.g. file not found, out of space, corrupt data etc.
- check files before attempting to use them for processing
- e.g. file not found, out of space, corrupt data etc.
- Authentication
- username + password to access systems
- reCaptcha to verify user is not bot
- online bot submit data automatically
- reCaptcha to verify user is not bot
- username + password to access systems
- Communication Error
MAINTAINABILITY
- make other programmers understand coding
- use comments to:
- section program
- explain functions
- section program
- use comments to:
- indentation for every selection + iteration branch
- use descriptive variable names
- use procedures + functions to structure + eliminate duplicated code
- constants declared at top
- use procedures + functions to structure + eliminate duplicated code
- use descriptive variable names
- make other programmers understand coding
TESTING
- Why?
- ensure no errors in code
- check if acceptable performance
- ensure unauthorised access is prevented
- test against requirements
- ensure unauthorised access is prevented
- check if acceptable performance
- ensure no errors in code
- The Types
- Iterative Testing
- while software is being developed
- checked for functionality
- easy to identify errors in existing code
- checked for functionality
- while software is being developed
- Terminal/Final Testing
- performed when program is finished
- test that all modules work together
- test if it produces required results with:
- valid, invalid and borderline
- test if it produces required results with:
- test that all modules work together
- performed when program is finished
- Iterative Testing
- Why?
Information
- Description
- GCSE Computing Mind Map on 2.3 Robust Programs, created by Neil Dickinson on 17/02/2020.
- Created by
- Neil Dickinson
- Views
- 1
- History
-
- Created by kimi rod · Jan 29, 2020
- Copied by Neil Dickinson · Feb 17, 2020
- Rating