Defense, Testing, IDE Flashcards
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