2.3 robust programs

Cards (40)

  • What is authentication in programming?
    A method to verify user identity
  • What does authentication allow a program to do?
    Access the program for verified users
  • What do users typically provide for authentication?
    Username and password
  • What are the three main authentication factors?
    Knowledge, possession, and biometrics
  • What is an example of something you know in authentication?
    Password or secret answer
  • What is an example of something you have in authentication?
    Smart card or mobile phone app
  • What is an example of something you are in authentication?
    Face recognition or fingerprint
  • What is two-factor authentication?
    Using two different authentication factors
  • What is a logic error in programming?
    An error in program operation
  • What can cause a logic error?
    Incorrect use of operators
  • Can a program run with logic errors?
    Yes, but it won't function correctly
  • What is a syntax error?
    A mistake in code writing rules
  • What can cause a syntax error?
    Misspelling or missing brackets
  • Will a program run if there are syntax errors?
    No, it will not run
  • What is input validation?
    Checking user inputs for correctness
  • Why is input validation important?
    To prevent program crashes from incorrect data
  • What is a range check in input validation?
    Ensuring input is within a specified range
  • What is a length check in input validation?
    Ensuring input is not too long or short
  • What is a presence check in input validation?
    Ensuring input is provided
  • What is a format check in input validation?
    Ensuring data is in a specific format
  • What is a type check in input validation?
    Ensuring data is of a specific type
  • Will validation catch all errors?
    No, users may still make typos
  • What does verification require from the user?
    Entering key twice for accuracy
  • What is good practice in programming?
    • Use meaningful variable names
    • Check user inputs for validity
    • Implement access control based on roles
  • What is bad practice in programming?
    • Using vague variable names
    • Allowing unrestricted access based on username only
    • Not validating user inputs
  • What does a test plan provide?
    Structure to testing and records results
  • What types of data should be used in testing?
    Normal, boundary, invalid, and erroneous data
  • What is normal data in testing?
    Correct data typically inputted by users
  • What is boundary data in testing?
    Correct data at the outermost limits
  • What is invalid data in testing?
    Data that is too large or small
  • What is erroneous data in testing?
    Completely incorrect data
  • What is the purpose of indentation in code?
    To group code within functions or procedures
  • How does indentation help in programming?
    Makes code easier to read and understand
  • What are comments in code?
    Lines that do not execute and explain code
  • What do comments help with in programming?
    Explain functionality and prevent accidental deletion
  • What is the purpose of testing in programming?
    To locate and remove errors in code
  • When does testing take place?
    While the program is being written
  • What happens if an error is found during testing?
    It is fixed and retested
  • What is smaller testing?
    A final check after code completion
  • Why is smaller testing harder?
    Due to the amount of code