1/31
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
Defensive Design
Refers to designing and creating programs which are able to handle unexpected or erroneous data and/or inputs by anticipating misuse.
Importance of Defensive Design
Ensures the number of bugs in a program are reduced, the program behaves as expected regardless of user input, and any possible errors are accounted for.
Authentication
The process of determining the identity of a user, usually through a username and password.
Input Validation
The process of checking that data is appropriate for its use, so that it can be correctly processed without any errors.
Presence Check
Ensures that data has been entered and not blank.
Range Check
Ensures that an input falls within the required range.
Length Check
Ensures a specified number of characters have been entered.
Maintaining Programs
It is incredibly important to maintain programs to ensure that they function as intended, are secure, and can be improved over time.
Sub-programs
Functions and procedures that help to break down a program into manageable chunks, allowing for code reuse and easier testing.
Naming Conventions
All variables, functions and procedures should be appropriately named to signify their purpose, making it easier to track their roles.
Indentation
Required for the syntax of most programming languages and helps to visualize and understand what sections code belongs to.
Commenting
Using comments to describe what each line of code or function is responsible for, facilitating easier understanding later.
Density Calculation
The density is calculated by dividing mass by volume.
Comments in OCR Pseudocode
Comments in OCR Pseudocode are written using '//'. The hash key, '#', is used in Python.
Purpose of Testing
All programs should be tested to ensure that they are robust, secure, and work as intended.
Destructive Testing
Testing is usually destructive, meaning that you should aim to find as many errors through rigorous testing, rather than just showing that a program works.
Iterative Testing
This type of testing happens throughout development, usually testing individual sub-programs as they are created.
Final Testing
Testing which takes place at the end of development, which aims to test the functionality of the entire program and check for any bugs.
Alpha Testing
Alpha testing is carried out by developers in-house to fix any remaining issues.
Beta Testing
Beta testing is performed by groups of real end-users, commonly seen in large software releases such as in games.
Syntax Errors
Syntax errors are errors which break the grammatical rules of the programming language, which stop the program from running.
Common Syntax Errors
Common syntax errors include: Missing brackets, quotation marks or colons; Misspelling keywords, e.g prnt instead of print; Using variables which have not been declared; Incorrect indentation.
Logic Errors
Logic errors are errors in the program's design or logic, which cause it to produce an unexpected or incorrect output, even if the program runs or the syntax is correct.
Example of Logic Error
In the example, speed should be calculated as: speed = distance / time.
Test Data
Types of Test Data include Normal, Boundary, and Erroneous.
Normal Test Data
Typical input, e.g. 5.
Boundary Test Data
On the edge of valid range, e.g. 1 and 10.
Erroneous Test Data
Invalid input, e.g. -1, eleven, 'abc'.
Selecting Suitable Test Data
You should be able to identify appropriate test data for a given input field and justify why it's used.
Refining Algorithms
After an algorithm has been developed and tested, it may be refined over time to improve its functionality or its capacity.
Changes in Algorithm Refinement
Changes may include fixing problems found throughout testing, adding additional functionality, or improving existing functionality.
Efficiency in Algorithms
Making the program more efficient by removing unnecessary components.