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.
Iterative testing:
Multiple Development cycles to refine and adjust code to requirements of the customer.
Final testing
One development Cycle, all features of code added at once. The program is tested against initial requirements and sold.
Normal Data
things a user is likely to input
Extreme (Boundary) Data
Values at the limit of which the program should handle
Errorneous Data
Inputs the program shouldn’t accept
IDE: What does it stand for?
Integrated Development Environment
Translators: What into what?
Any language into machine code.
Compiler: What does it do?
All source code at once into an executable file;Only needed to use once; Returns list of errors for program after compiling is complete. Once compiled runs quickly.
Interpreter: What does it do?
Translates and runs code one line at a time; Needed every time to run program; Will return the first error and then stop; Programs run more slowly.
Low-Level languages:
One line of code is equal to one line of machine code; Made for one type of machine or processor; Difficult to read, understand and modify; More direct control of CPU and-so runs more memory efficiently and faster; Programmer needs to know of the internal structure of CPU.
High-Level Languages:
Don’t have a lot of control of CPU; Easier to read, understand and manipulate; Can more easily store data without knowing of memory structure; Each line represents multiple lines of machine code; Will work for multiple machines and processors.
Assemblers; What are they?
Assemble assembly language into machine code. Each assembler is unique to the CPU.