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
two types of translators?
compilers
interpreters
what is a compiler?
translates a high level language directly into machine code
creates one executable file
what is an interpreter?
take each instruction and call sub routines to carry out that instruction
SIMPLE:
translates and runs the source code one instruction at a time and doesn’t create an executable file
what does IDE stand for?
integrated development environment
what is an IDE?
a piece of software that provides features to help a programmer develop their program
examples of IDE’s?
error diagnostics
syntax highlighting
automatic indents
what is error diagnostics?
helps the programmer find where they made a mistake
what is syntax highlighting?
displays different variables of the code in colours
what is computational thinking?
steps taken to find the best solution to a complex problem
what are the three types of computational thinking?
decomposition
algorithmic thinking
abstraction
what is decomposition?
breaking a complex problem down into smaller more manageable problems to solve individually
what is algorithmic thinking?
a logical way of getting the problem to the solution
what is abstraction?
removing useless details from a problem and focusing on the important parts
what is pseudocode?
not an actual programming language but follows a similar structure to roughly read like one
shows steps without displaying finer details (syntax)
advantages of pseudocode?
quick and easy to write
easy to understand for beginners
easy to convert into any programming language
what is a flowchart?
diagram used to represent data in a program
why are flowcharts important?
help programmers develop the most efficient coding because they can clearly see where the data is going to end up
start/stop
rounded rectangle
input/output
parallelogram
process
rectangle
decision
diamond
arrow
arrow
diamond
decision
input/output
parallelogram
rounded rectangle
start/stop
rectangle
process