SECTION 7 - Design, testing and IDEs Flashcards
Structure/modular diagrams
Show the smaller tasks of a larger program. Made by decomposing program into manageable modules which are further decomposed.
Pros of structure/modular diagrams
- Coding is easier as you are only writing code to carry out simple tasks.
- Easier to test program as each module can be tested individually.
- Lots of programmers can work on one program as each module is written independently.
Well-maintained program
Makes it easy for other programmers to understand what code means. They should be able to change parts without it affecting rest of code.
Features that can improve maintainability of source code
- Comments: Explain what key features of program does
- Indentation: Separates different statements in program
- Variables should be named
Programmer try to protect their code through defensive design by…
- Anticipate how users might misuse a program, then attempt to prevent it happening
- Ensure code is well-maintained
- Reduce number of errors by testing
Input validation
Checking if data meets certain criteria before passing through program
Examples of input validation
Range check, length check, format check
Authentication
Confirms identity of a user before they are allowed to access certain parts of program
A common way that programs use authentication is by using ___.
Passwords
Common way to increase security of password-based authentication
- Force user to use strong passwords and change them often
- Limit number of failed authentication attempts before account is blocked
- Ask random selection of characters from password (Like online banking)
Syntax errors
When the interpreter or complier does understand the code you have written because it does not the follow the rules and grammar of the pro