Defensive Design

Cards (33)

  • What is the focus of Key Stage 3 and GCSE in this document?
    Fundamentals of IT and programming
  • What is the purpose of defensive design in programming?
    To create secure and robust programs
  • What is one consideration in defensive design?
    Anticipating misuse
  • How does anticipating misuse help in programming?
    It prevents potential misuse of the app
  • What is input sanitisation?
    Cleaning up input data
  • Why is input sanitisation important?
    It prevents SQL injection attacks
  • What does validation check in programming?
    Whether input data meets criteria
  • What is an example of validation?
    A length check on a password
  • What is verification in programming?

    Checking if entered data is correct
  • What is an example of verification?
    Double entry of data
  • What is authentication in programming?
    Ensuring authorized user access
  • What is an example of authentication?
    Usernames and strong passwords
  • What is maintainable code?
    Code that is easy to read and understand
  • Why is maintainable code important?
    It allows easy understanding by others
  • What are the key aspects of input validation?
    • Range Check: Data within a range
    • Type Check: Data of a certain type
    • Format Check: Data in a specific format
    • Presence Check: Data not left blank
    • Lookup Table: Acceptable entries list
    • Length Check: Input length within limits
  • What is a range check?
    Checks if data is within a range
  • What is a type check?
    Checks if data is a certain type
  • What is a format check?

    Checks data is entered in a certain way
  • What is an example of a format check?
    Date of Birth (DD/MM/YYYY)
  • What is a presence check?
    Checks that data has been entered
  • What is an example of a presence check?
    Password: fluffythecat123
  • What is a lookup table?
    A table of acceptable entries
  • What is an example of a lookup table?
    A list of acceptable entries
  • What is a length check?
    Checks the length of the input
  • What is an example of a length check?
    Telephone Number: 08323877319
  • What are the methods to improve program maintainability?
    • Use subprograms for code reuse
    • Appropriate variable naming conventions
    • Indentation for readability
    • Comments for understanding code purpose
    • Use constants for consistency
  • What is modularisation in programming?
    Using subprograms to reuse code
  • Why is using appropriate variable names important?
    It ensures the purpose is understood
  • What is the purpose of indentation in code?
    To improve readability of code
  • Why are comments crucial in programming?
    They help understand code purpose
  • What is the benefit of using constants in programming?
    Improves code consistency
  • How does using constants help in debugging?
    It makes code easier to read
  • What are the exam questions related to defensive design?
    1. Describe considerations for defensive design.
    2. Describe each validation check with examples.
    3. Explain ways a program can be maintained.