Paper 2 - Design, Testing and IDE's Flashcards
Defensive Design:
Will never break or produce errors - Very difficult to achieve. Programmers anticipate how users may: misuse their program and prevent it; ensure their code is well maintained and reduce the number of errors in code through testing.
Input Sanitation
Removing unwanted characters
Input Validation
Checking if data meets certain criteria.
Examples of input validation :
Range Check - Check data is within a specified range
Presence Check - Checks data has been entered
Check Digit - Checks numerical data has been entered
format check - Checks data is in correct format (E.g date)
Look-up Table Checks data against table of values
Length Check - Checks data is correct length
Authentication
Confirms identity of user, allowing the access to data
What is meant by Well-maintained?
Comments
Correct indentation
Variables and sub programs should be appropriately named
Global Variables used only when necessary
Overall easy to understand
Syntax Errors:
Compiler or interpreter doesn’t understand code due to the code not following rules or grammar.
Logic Errors
When the program can’t run due to something unexpected.
Syntax Errors: How to find?
Diagnosed by Interpreter or compiler.
Logic Error: How to find?
Diagnostic testing using a test plan.
Performance test:
Test how quickly certain features run and their impact on computer resources
Usability test:
Test how user friendly the interface and features are.
Security Test:
Tests vulnerability to attacks and security of data.
Load/Stress test:
How program runs under extreme conditions e.g lots of users at the same time.
Functionality Test:
Tests if program meets initial requirements.