2.3 - errors and maintanence Flashcards
what coding techniques can you use to keep your code maintainable later
subprograms, sensible variable names, indentation, commenting
what techniques can you use to make sure an input is valid
check if it is the right type of variable and check if it is within range and stuff
what is validation
checking if something someone inputted is valid for that field
what is authentication
checking whether a user is allowed (usernames and passwords)
what is a syntax error
an error in the code, usually spelling or punctuation, that stops the code from running (IDE has an error message)
what is a logical error
a mistake in the code that makes the code run incorrectly and produce the wrong output, but not crash
why do programs need to be tested
to make sure they work as expected
what are the 4 categories of data testing
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
what is the difference between iterative testing and final testing
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