Defense, Testing, IDE Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the purpose of defensive design

A

Ensures program functions properly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How might programmers try to protect their programs through defensive design

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is input validation

A

Checking if data meets certain criteria before passing it into the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is input sanitation

A

Removing unwanted characters before passing data through the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Range check
Presence check
Check digit

A

Checks the data is within a specified range
Checks the data has actually been entered
Checks numerical data has been entered correctly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Format check
Look-up check
Length check

A

Checks the data has the correct format
Checks the data against a table of acceptable values
Checks the data is the correct length

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What may happen if there is too much defensive design

A

Affects functionality and impacts user experience

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is defensive design

A

Method of designing a computer program so that it functions correctly, doesn’t produce errors and doesn’t crash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is maintainability

A

Characteristic of defensive design which helps programmers to modify and repair computer programs more easily

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is authentication

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the ways to increase security

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe the features that can improve maintainability of source code

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Benefits of well maintained program

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are syntax and logic errors

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define structure diagrams

A

Uses decomposition to show the smaller tasks of a larger program which are further decomposed into individual tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is iterative testing

A

When a programmer performs checks to fix errors in a program while the program is still in development to prevent larger errors

17
Q

What is test plan

A

Created and used by a programmer to identify which parts of a program will be tested and how the test will be performed

18
Q

Advantages of structure diagrams

A

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

19
Q

What is final testing

A

Occurs once the program is finished and before it is released to the public or customer
Entire program is tested at same time

20
Q

What is normal data
What is boundary data
What is erroneous data

A

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

21
Q

What is testing

A

Process of checking if a computer program functions in the intended way and meets certain requirements

22
Q

What is trace table

A

Method of tracking the value stored on a variable as the program is run while being tested

23
Q

What is invalid data

A

Data inputs which are the correct data type but should be rejected by the program