Mind map
2.3 Producing robust programs
Map content
2.3 Producing robust programs
data validation
- check to ensure that the data entered is sensible and reasonable. It does not check the accuracy of data.
data sanitisation
- trims or strips strings removing unwanted characters to make sure it contains only permitted characters e.g. D%ave the % would be removed
authenticication
- the process of verifying the identify of a user or process
maintainability
- updating code so that it is compatible with current requirements
comments
- to help describe the code and structures in a program using #
indentation
- used to show the programs structure e.g. where selection or iteration or functions are used
Data validation and verification methods
- check digit
- The last one or two digits in a code are used to check the other digits are correct
- e.g. Bar code readers in supermarkets use check digits
- The last one or two digits in a code are used to check the other digits are correct
- format check
- Checks the data is in the right format
- e.g. A National Insurance number is in the form LL 99 99 99 L where L is any letter and 9 is any number
- Checks the data is in the right format
- length check
- Checks the data isn't too short or too long
- e.g. A password which needs to be six letters long
- Checks the data isn't too short or too long
- lookup table
- Looks up acceptable values in a table
- e.g. There are only seven possible days of the week
- Looks up acceptable values in a table
- presence check
- Checks that data has been entered into a field
- e.g. In most databases a key field cannot be left blank
- Checks that data has been entered into a field
- range check
- Checks that a value falls within the specified range
- e.g. Number of hours worked must be less than 50 and more than 0
- Checks that a value falls within the specified range
- spell check
- Looks up words in a dictionary
- e.g. When word processing
- Looks up words in a dictionary
- check digit
anticipating missuse
- Defensive program design will consider and anticipate misuse. Misuse may be in the form of a brute force attack on the program. E.G Many programs and systems only allow a user to enter a password three or four times before it locks out the system.
contingency palnning
- Once a programmer has anticipated the misuse they can then plan for the these issues. For example: Limiting the number of logon attempts. Ensuring the code is robust in validating the data entered
testing and errors
- iterative testing
- This happens overtime and is repeated throughout the development of the program
- final/terminal teting
- when the product is released and real end users begin using it. Very often, end users find things wrong with systems that the programmers did not expect.
- syntax errors
- error in the rules/grammar of the language Eg missing colon / spelling mistake
- logic errors
- The program is written to do something other than what the programmer intended Eg Resetting only the first 9 elements in an array instead of all 10.
- test data
- Something which has been specifically identified for use in tests, typically of a computer program
- iterative testing
Information
- Description
- Mind Map on 2.3 Producing robust programs, created by Millie Robson on 28/02/2019.
- Created by
- Millie Robson
- Views
- 1
- Rating