2.3 Producing Robust Programs Flashcards
Defensive Design Considerations
Considerations made by programmers when creating solutions to problems, such as ensuring data is valid and secure.
Input Sanitisation
The process of cleaning up input data by removing unwanted characters and symbols, preventing issues like SQL injection.
Validation
Ensuring that the data entered fits within a specified range or type, to prevent errors and unexpected outcomes.
Authentication
The process of verifying the identity of users by using usernames and passwords to secure access to data.
Maintainable Code
Code that is written in a way that other programmers can easily understand and modify, especially when dealing with large projects.
Comments in Code
Annotations added to code to explain what it does, making it easier for others to understand.
Indentation
Properly spacing code to make it easier to follow the structure of the program.
Meaningful Identifier Names
Using descriptive names for variables, constants, and functions to avoid confusion and clarify the program’s intent.
Use of Sub-programs
Dividing code into smaller, reusable sections to improve structure and readability.
Iterative Testing
Testing individual sections of code during development to ensure they work as expected.
Final/Terminal Testing
Carrying out testing after the entire program has been developed to ensure the program works as a whole.
Test Data
Data chosen to test how a program performs, ensuring the program handles various cases appropriately.
Normal Test Data
Valid data within the expected range, used to test whether the program can accept and process it correctly.
Invalid/Erroneous Test Data
Data that is not accepted by the program, such as entering an incorrect value like ‘s’ when a number is expected.
Boundary Test Data
Data that lies at the edge of acceptable input ranges, used to check if the program can handle values like 0, 1, 10, etc.
Test Data Types
The different categories of test data, including normal, invalid, and boundary data, to ensure the program functions properly in all situations.
Building Robust Programs
The process of ensuring a program can handle various inputs and operate as expected under different conditions.
Designing Robust Programs
The planning and structuring of code in a way that ensures the program is reliable, secure, and user-friendly.
Testing Robust Programs
The process of evaluating a program by using various test cases to ensure it meets the desired specifications.
Iterative Testing (Further Detail)
Testing the sections of a program while it is being developed to ensure errors are caught early in the process.
Final/Terminal Testing (Further Detail)
The final round of testing after the program is completed, ensuring that it works as a whole and meets all requirements.
Authentication Process
Ensuring that only authorized users are allowed to access certain resources by requiring usernames and passwords.
Maintainable Code Practices
Using proper documentation, indentation, and meaningful naming conventions to write code that is easier for others to understand and modify.
Testing Methods
Including normal, invalid, and boundary test data to make sure the program handles a variety of situations.
Sub-program Usage
Sub-programs allow the program to be broken down into smaller parts, improving readability and maintainability of the code.