Computer science Lockdown Revision

?
View mindmap
  • Computing Revision for Lock-down Work
    • Defensive Design
      • Input Sanitation
        • corrects the input so the user does not have to enter the data again just because of silly mistakes
      • Input Validation
        • Type check checks the input is in the correct data type
        • Range check checks that the data is within a correct range
        • Presence check checks that some data has been entered
        • Format check checks the input is in the correct format
        • length check checks the input has the correct number of characters.
      • Planning for contingencies
        • Division by zero can crash a program so ahead of time you should code the program to be proofed of this error.
        • comunication errors can occur so the programmer should code the program so the user can cancel the connection so they can continue to use their device without having to restart it.
        • Printer errors cause issues so the programmer must code the program in a way that the user can have the option to reprint or cancel an item.
        • Disk errors do occur so programs should check files and data before attempting to use them for further processing.
      • Authentication
        • the most obvious one is usernames  and passwords to prevent unauthorised access to systems.
        • There needs to be a secure way to reassign passwords
        • reCAPTCHA protects against bot attacks.
    • Syntax and Logic Errors
      • Syntax Errors
        • crash program
        • the rules of the coding language have been broken
      • Logic Errors
        • the program still runs
        • errors that still follow the language rules but don't follow the programs plan
    • Maintainability
      • comments
        • explain unusual approaches that were necessary
        • explain purpose of the program
        • explain sections of code
        • don't get read by the CPU/code processor
        • visually divide sections
      • Whitespace
        • makes sections easier to see
      • Indentation
        • makes sections easier to read
      • Descriptive variable names
        • makes it easier to understand what a variable is for
      • Procedures
        • structure the code
        • eliminate duplicating code
      • Constants
        • declare them at the top of a program
    • Suitable Test Data
      • you should always test your program to see if it has errors by testing inputs e.g.
        • if the program shouldn't accept letters test for word denial
        • if your program shouldn't accept symbols test for symbol denial
        • if the program shouldn't accept decimals test for decimal denial
        • if your program should only accept 4-digit numbers you should test a 5-digit number and a 3-digit number to see if they get denied. then test a 4-digit number to make sure it gets accepted
    • Reasons for Testing
      • The main 4 reasons for testing are:
        • to ensure there are no errors
        • to check that the program has an acceptable performance and usability
        • to ensure that unauthorised access is prevented
        • to check a program meets its requirements
    • Types of Testing
      • Iterative Testing
        • performed when the software is being developed
        • each new module is tested as it is written
        • checking new modules do not introduce errors
        • tests to ensure the program handles erroneous data
      • Terminal Testing
        • performed when the program is finished
        • testing all modules work
        • testing the program produces the required results
        • checking the program meets its requirements
    • Programming Languages
      • Machine Code
        • binary representaton of instructions
        • have an opcode and operand instructions
      • low level languages
        • written in a simplified form of text similar to words
        • assembly language
        • one type of processor only
        • easily translated into binary
        • hard to write
        • fast to execute
        • memory is efficient
      • High level languages
        • source code written in languages like java, c++ and python
        • translated by a compiler or interpreter
        • one source code
        • similar to english
        • easy to code
        • less memory efficient
        • can be slower to execute
    • Translators
      • compiler
        • only translates code once
        • more efficient
        • makes loops faster to execute
      • interpreter
        • translates line by line
        • less efficient
        • slower for loops
      • Purpose of a translator
        • converts eadier to write high level code into binary which a computer can understand
    • IDE
      • features
        • allows you to find errors and correct them easily
        • often contains a debugger
        • often contains a virtual machine

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all unknown resources »