Section 7- Design, Testing and IDEs

Cards (23)

  • What are 4 ways to improve maintainability?
    Write comments
    Use indentation
    Use descriptive names for variables
    Use sub programs to separate parts of the program
  • What are the advantages of using structure diagrams?
    Coding is easier- only writing code to carry out simple tasks
    Lots of programmers can work on one program- as each module can be written independently
    Easier to test structured programs- each module tested independently
    Individual sub programs and modules can be fixed and updated without affecting the rest of the program
    Able to reuse subprograms and modules for any future programs
  • How do programmers try to protect their programs using defensive design?
    Anticipation of how users may misuse the program (and prevent it from happening)
    Ensure code is maintained well
    Reduce number of errors in code using testing
  • What is input validation?
    Checking that data meets a certain criteria before passing it through the program
  • What are the types of input validation?
    Range check
    Presence check
    Format check
    Length check
  • What is a range check?

    Checks the data is within a specified range (1-100)
  • What is a presence check?

    Checks data has actually been entered
  • What is a format check?
    Checks the data has the correct format (date)
  • What is a length check?

    Checks the data entered is the correct length
  • What does authentication do?
    It can confirm the identity of a user before they're allowed to access certain pieces of data or features of the program
  • What are some common ways to increase the security of password-based authentication?
    Force users to use strong passwords
    Change password regularly
    Limit number of failed attempts before account is locked or access is lost
    Ask for a random selection of characters from the password on each authentication
  • What are the 2 types of errors?
    Syntax errors and logic errors
  • What is a syntax error?

    Where the compiler or interpreter doesn't understand something you've typed because it doesn't follow the rules of grammar for the programming language
  • What is a logic error?
    An error where the compiler or interpreter is able to run the program but it doesn't run the way it's intended- unexpected
  • What are the two types of testing?
    Iterative testing
    Terminal (final) testing
  • What is iterative testing?

    Testing that happens while it is being developed- happens repetitively throughout the development to fix any errors
  • What is final testing?
    Program is tested at the end of development process
  • What are the types of data used in a test plan?
    Normal
    Boundary (or extreme)
    Invalid
    Erroneous
  • When is a test plan made?
    Before development
  • What is normal data?

    Data that a user is likely to enter into a program
  • What is boundary data?
    Values a the limit of what the program should be able to handle
  • What is invalid data?
    Inputs that will be rejected by the program
  • What is erroneous data?

    Input with an incorrect data type that will be rejected by program