Design, Testing and IDEs Flashcards
What do Structure diagrams show?
Smaller tasks of a larger program
Advantages of Structure Diagram
Easier/simpler to code smaller tasks
Lots of programmers can work on different parts of the program independently
Easier to test smaller sections of program
Easier to fix smaller sections without effecting the rest of the program
How to make your program ‘Well-maintained’
Comments - to explain key features of a program, help other programmers understand your program
Subprograms - easier for other programmers to see how different parts of a program work
Variables, sub programs and parameters - need to be named so programmers know what they do
What is defensive design?
Contingency planning using validation, maintainable code and testing
Anticipate how users may use the program unexpectedly -> and prevent it from happening
Make code well-maintained
Test code to reduce number of errors
Input Validation
Checking if data meets certain criteria before passing into the program
Types of input validation
Range Check - checks data is within a specified range
Presence Check - checks data has been actually entered
Format Check - checks data is in the correct format
Look-up Table - checks data against a table of acceptable values
Length Table - checks data is the correct length
What is authentication?
Confirms identity of a user before they can access certain data
e.g. passwords
How to increase the security of a password
Use strong passwords, change them regularly
Limit number of failed attempts
What are syntax errors
when the compiler does not understand something in the code as it doesn’t follow the rules or grammar of the programming language
What are logic errors
when the compiler can run the program but the output is unexpected
Types of Testing
Iterative Testing
Final (terminal) testing
What is iterative testing
program is tested while being developed
Used for: small errors, preventing larger errors occurring later on in development
What is final (terminal) testing
program is tested after developing (at the end).
Whole program is tested at the same time
What is a test plan?
Outlines what you are testing and how
It should cover all possible paths through a program.
What types of test data should be used?
Normal Data - an expected input
Boundary Data - values at the limit of what the input can be
Invalid Data - correct data type but rejected by program
Erroneous Data - wrong data type and rejected by program