2 Flashcards
things that keep a program maintained?
comments
indentation
suitable variable names
sub programs
what is defensive design?
anticipates how users might misuse their program then attempt to prevent that
ensure code is well maintained
reduce errors through testing
two types of errors?
logic error
syntax error
what is a syntax error?
when the compiler/interpreter doesnt understand part of the code because it doesnt follow the programming language
causes the whole code to not run
what is a logic error?
when the compiler or interpreter is able to run the program but it does something unexpected
what are the two types of testing?
iterative testing
final testing
what is iterative testing?
testing the program while it is being developed
repeating a section of code
what is final testing?
testing the whole program when it is finished to check it works as intended
what is normal data?
what the user is likely to input
what is boundary data?
values at the limit of what the program can handle
what is invalid data?
inputs with the correct dats type that should be rejected by the program
what is erroneous data?
incorrect data type that should be rejected by the program
what is a trace table?
give a simple way of testing if code works correctly
keeps track of values and variables as you go through the code
what is a translator?
translates the code from high level to low level for the computer to read
example of high level language?
python
CC+
example of low level language?
machine code
assembly language
what type of code do computers only understand?
machine code
1s and 0s