1/22
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
advantages of structure diagrams (5)
coding is easier
easy collaboration because modules are written independently
easy to test each module individually
easy to fix each module
reuse the subprograms
why should code be well maintained?
easier for other programmers to understand
how to improve maintainability of code: (4)
comments - explains code to other programmers
indentation - programmers can see the different structures
naming conventions - programmers can understand the purpose of the variables and keep track of them
subprograms - programmers see how different parts work
how can programmers protect their programs with defensive design? (3)
anticipate misuse and prevent it
ensure their code is well maintained
reduce the errors with testing
define input validation
checking if data meets certain criteria before passing it into the program
5 input validation checks:
range check - within specified range
length check - correct length
format check - correct format
presence check - entered data
look-up table - against acceptable values
how to increase the security of a password based authentication system: (3)
strong passwords changed regularly
limit failed attempts
random selection of characters from the password
define syntax error
problem with the grammatical rules of the programming language. code doesn’t run
define logic error
problem with the code which still runs but produces an unexpected output
what is iterative testing?
program is tested during development. modules are tested so that they work
what is final testing?
testing the whole program at once after it has been developed
4 types of test data:
boundary - limit of the range
erroneous - incorrect data type
normal - correct and should be accepted
invalid - correct data type, outside of range
characteristics of high level languages: (5)
one line represents many of machine code
code works on different processors
code is easy to read, write, teach and understand
must be translated
programs are slower and less memory efficient
characteristics of low level languages: (4)
compatible for one processor
code is hard to read, write, teach and understand
doesn’t need to be translated
more memory efficient and faster
define interpreter
translates code line by line
define compiler
translates the whole code and produces an executable file
advantages of interpreter: (2)
better for debugging because the code stops once an error is found
less memory use
disadvantages of interpreter: (2)
programs run slower - translated every time
has to be distributed with source code (no executable file) - modified without permission
advantages of compiler: (5)
run quickly once translated
creates executable file - cannot be modified
only needed once
optimises code
produces an error report of all the errors
disadvantages of compiler: (3)
worse for debugging - errors returned after all the code has been translated
compiling is slow
memory use
features of IDEs:
code editor
run-time environment
error diagnostics
translators
(Breakpoints)
what does a code editor have?
line numbering
auto-colour coding
auto-correct
auto-indentation
auto-complete
how do error diagnostics help?
debugging to find errors
location of the error and how to fix it