Producing Robust Programs (2.3) Flashcards

1
Q

What is input sanitisation

A
  • to clean up input data, removing any unwanted data such as extra spaces, or removing special characters/symbols. This also helps prevent SQL injection.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is validation

A
  • validating the data entered so that it fits a range of values, or is of a specific type. Entered data must fit criteria to prevent logical errors and unexpected outcomes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is authentication

A
  • only allowing authorised users to access data through use of usernames and passwords etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is maintainable code

A
  • this allows other programmers to also understand the code, especially when dealing with large programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What 4 ways can maintain code

A
  • Comments : annotating the code to make it easier to understand and read
  • Indentation : spacing the code appropriately, so it is easily to follow different sections of the program and what they do
  • Meaningful identifier names : using appropriate names for identifiers (variables, constants etc.) linked to the purpose so it does not cause confusion
  • Use of sub-programs :
    allows programmer to structure code so parts can be developed and changed independently without affecting the rest of the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why do you test your code

A
  • Testing allows the programmer to test the function of programs to make sure they work as expected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is iterative testing

A
  • carried out while the program is being developed (ongoing) so different sections of code are tested out by the programmer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Final/Terminal testing

A
  • carried out when all the sections of the program and code have been completed and developed. The program is tested as a whole to make sure it functions as expected.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is normal test data

A
  • selecting valid/expected values to see if the program accepts these without causing errors e.g. if the valid numbers are 1-10 then choose a number within this range
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Invalid/Erroneous test data

A
  • selecting data which the program should not accept such as entering “six” as string instead of 6 as integer so it should be rejected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is boundary test data

A
  • selecting values which lie on the boundary of the accepted range of values e.g. if 1-10 are valid values then entering 0,1,10,11 are boundary data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly