1/15
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Robust Program
Software that is built so it continues to work despite invalid input, user errors, hardware problems and cyberattacks by employing defensive design techniques and appropriate testing
Defensive design
Designing a program to be robust, planning for all possibilities or contingencies, anticipating misuse and using authentication to prevent unauthorised access
Commenting
Adding descriptions of code to a program, which improves maintainability, making it easy for others to understand and change
Indentation
A readability technique, moving code to the right to show where a block of code starts and ends. Mandatory in Python
Maintainability
Making code easier to follow and fix with comments, indentation and meaningful identifiers for variables and data structures
Identifier
The name chosen for a variable, data structure or subprogram. It should follow naming conventions and be meaningful e.g. temperature or calc_average, not just t or calc.
Naming conventions
House rules for naming subroutines, functions and variables to ensure maintainability
Validation
Checking an input value is reasonable, for example a number falls within a sensible range or the an email address has the correct format, it prevents runtime errors
Range check
A type of validation where the input value must fall within two bounds e.g. age must be between 0 and 150
Length check
A type of validation where the input value must have the right number of characters, e.g. a phone number must have 11 digits
Presence check
A type of validation where the input value cannot be left blank, there must be data there
Format check
Validation type that checks that the correct combination of characters has been entered. For example a postcode must match aa## #aa e.g. CM12 8UU
Lookup check
Where the input is validated against an allowable list of values e.g. a country must be in the list [England, Scotland, Wales, NI]
Authentication
Verifying the identity of someone, usually with a password. If a second method is used, e.g. text message, this is "two factor authentication" or 2FA
Subprogram
A block of instructions that completes a specific task. It can be a function or procedure. Breaking a large program into these improves maintainability
2FA
Two-factor authentication, making a login system more secure by adding a second method, such as a text message or code generator app, as well as a password