Defense, Testing, IDE Flashcards
(23 cards)
What is the purpose of defensive design
Ensures program functions properly
How might programmers try to protect their programs through defensive design
Anticipate how users might misuse their program, then prevent it from happening
Ensure their code is well maintained
Reduce number of errors in the code through testing
What is input validation
Checking if data meets certain criteria before passing it into the program
What is input sanitation
Removing unwanted characters before passing data through the program
Range check
Presence check
Check digit
Checks the data is within a specified range
Checks the data has actually been entered
Checks numerical data has been entered correctly
Format check
Look-up check
Length check
Checks the data has the correct format
Checks the data against a table of acceptable values
Checks the data is the correct length
What may happen if there is too much defensive design
Affects functionality and impacts user experience
What is defensive design
Method of designing a computer program so that it functions correctly, doesn’t produce errors and doesn’t crash
What is maintainability
Characteristic of defensive design which helps programmers to modify and repair computer programs more easily
What is authentication
Method for checking the identity of a user before allowing them to access to data or program features through a use of e.g password
Describe the ways to increase security
Force users to use strong passwords and get them to change their password regularly
Limit the number of failed authentication attempts before access to account is lost
Ask for a random selection of characters from the password on each authentication
Describe the features that can improve maintainability of source code
Comments - explaining what key features of a program do
Indentation - can be used to separate different statements in a program - allows other programmers to see the flow of the program more clearly
Variables and sub programs - should be named so that they refer to what they actually are - helps programmers to keep track and recognise what the variables are
Benefits of well maintained program
Makes it easy for programmers to understand what the program is designed to do
Allows them to change parts of the program without producing errors elsewhere
What are syntax and logic errors
When the computer/interpreter doesn’t understand something you’ve typed because it doesn’t follow thr rules or grammar of thr programming language
When the complier or interpreter is able to run the program but the program does something unexpected
Define structure diagrams
Uses decomposition to show the smaller tasks of a larger program which are further decomposed into individual tasks
What is iterative testing
When a programmer performs checks to fix errors in a program while the program is still in development to prevent larger errors
What is test plan
Created and used by a programmer to identify which parts of a program will be tested and how the test will be performed
Advantages of structure diagrams
Coding is easier because you’re only writing to carry out very structure tasks
Lots of programmers can work on one program as each module can be written independently
Easier to test program
What is final testing
Occurs once the program is finished and before it is released to the public or customer
Entire program is tested at same time
What is normal data
What is boundary data
What is erroneous data
Data user is likely to input in a program
Values at the limit of what the program should be able to handle
Inputs that the program should not accept
What is testing
Process of checking if a computer program functions in the intended way and meets certain requirements
What is trace table
Method of tracking the value stored on a variable as the program is run while being tested
What is invalid data
Data inputs which are the correct data type but should be rejected by the program