programming techniques Flashcards
IDE
software which allows the user to enter, edit, compile/interpret and run programs
IDE - benefits
add line numbers automatically indent auto-complete commands (un)comment regions error reports
IDEs debugging: breakpoint
set a breakpoint in the program which will cause it to stop at that line
IDEs debugging: watch
set a watch on a variableso its value is outputted each time it’s changed
IDEs debugging: step through
step through the program line by line
IDEs debugging: tracing
trace the execution of a program
algorithm
a sequence of instructions that can be followed to solve a problem
pseudocode
a semi-english programming shorthand used to aid in algorithm design
identifier
a name that points to a memory locatoin
assignment
assigning a value to the memory location
variable
a storage location who’s value can change during execution
constant
a storage location who’s value can’t change during execution
constants - benefits
reduce the risk of errors by reducing access to the memory location
selection
controls which statements are run based on whether a condition is met
IF
program flow is controlled by evaluating a boolean condition
SWITCH/CASE
used to make it easier to code multiple condition checks
interation
a sequence of instruction is repeated multiple times making the program more efficient
WHILE
condition is tested upon entry of the loop, statements wont run if the condition is initially false
DO UNTIL
condition is tested upon exit of the loop, statements will run once if the condition is initially false
infinite loops - uses
2d games, gathering sensor data