CS Section 6 - Design, Testing and IDEs

Cards (91)

  • What is the purpose of Defensive Design in programming?
    To ensure programs function properly
  • Why do even the biggest software companies need to update their programs regularly?
    Because programs can have errors that need fixing
  • How can programmers protect their programs through Defensive Design?
    By anticipating user misuse and preventing it
  • What are the two main methods to prevent users from entering unwanted data?
    Input sanitisation and input validation
  • What is input sanitisation?
    Removing unwanted characters before passing data through the program
  • What is input validation?
    Checking if data meets certain criteria before passing it into the program
  • Give an example of input validation.
    Checking that an email address contains an @ symbol
  • What are the types of input validation checks?
    • Range check
    • Presence check
    • Check digit (CD)
    • Formal check
    • Look-up table
    • Length check
  • What does a range check do?
    Checks the data is within a specified range
  • What does a presence check do?
    Checks the data has actually been entered
  • What does a check digit (CD) do?
    Checks numerical data has been entered accurately
  • What does a formal check do?
    Checks the data has the correct format
  • What does a look-up table do?
    Checks the data against a table of acceptable values
  • What does a length check do?
    Checks the data is the correct length
  • What does the function formatName() do?
    It removes unwanted characters from a string
  • Is the function formatName() an example of input sanitisation or input validation?
    It is an example of input sanitisation
  • What are two validation checks Karen could use for a file name?
    Presence check and length check
  • Why is authentication important in programming?
    It confirms the identity of a user before accessing data
  • How do passwords typically work in authentication?
    They are associated with a username to verify identity
  • What is one way to increase password security?
    Force users to use strong passwords
  • What is a feature of well-maintained code?
    It includes comments explaining key features
  • Why is indentation important in programming?
    It helps to separate different statements for clarity
  • What should variable names in code refer to?
    What they actually are to help programmers understand
  • When should testing be conducted in the software development cycle?
    Before the program is released
  • What are the two types of programming errors?
    Syntax errors and logic errors
  • What is a syntax error?
    When the compiler doesn't understand the code due to incorrect grammar
  • What is a logic error?
    When the program runs but does something unexpected
  • How can syntax errors be diagnosed?
    By compilers and interpreters that return error locations
  • How are logic errors typically found?
    Through general use of the program and systematic testing
  • What is functionality testing?
    Testing to see if the program meets initial requirements
  • Why shouldn't functionality testing be left until the end of the process?
    Because it's better to spot errors early during development
  • What are the different types of testing in programming?
    • Performance Test: Tests speed and resource impact
    • Usability Test: Tests user-friendliness
    • Security Test: Tests vulnerability and data security
    • Load/Stress Test: Tests performance under extreme conditions
  • What is the purpose of a flow diagram in software design?
    To outline the requirements and design of the program
  • What are high-level programming languages?
    Languages that are easy for humans to write
  • What are low-level programming languages?
    Languages that are easier for computers to run but tricky for humans
  • What is machine code?
    The binary code that computers can read and execute
  • What is assembly language?
    A low-level programming language that is easier for humans than machine code
  • Why are high-level languages popular with programmers?
    Because they are easier for humans to write
  • What is the purpose of testing in software development?
    Testing ensures that the software meets its requirements and functions correctly.
  • What are the two types of computer languages?
    • High-Level Languages
    • Low-Level Languages