2.3 - errors and maintanence Flashcards

1
Q

what coding techniques can you use to keep your code maintainable later

A

subprograms, sensible variable names, indentation, commenting

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

what techniques can you use to make sure an input is valid

A

check if it is the right type of variable and check if it is within range and stuff

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

what is validation

A

checking if something someone inputted is valid for that field

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

what is authentication

A

checking whether a user is allowed (usernames and passwords)

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

what is a syntax error

A

an error in the code, usually spelling or punctuation, that stops the code from running (IDE has an error message)

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

what is a logical error

A

a mistake in the code that makes the code run incorrectly and produce the wrong output, but not crash

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

why do programs need to be tested

A

to make sure they work as expected

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

what are the 4 categories of data testing

A

normal - inputting normal values and checking if the program outputs the expected outcome
boundary - inputting values on the edge of the range it accepts and seeing if they still work
invalid - inputting values outside the boundaries of the code and seeing what it does
erroneous - inputting the wrong data type or something that doesn’t make sense for that program

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

what is the difference between iterative testing and final testing

A

iterative testing is where you test a program while writing it and improve on it bit by bit
final testing is where the whole code is finished and you test all of it at once

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