2.5 Flashcards
(17 cards)
High level
Adv and disadvantages
Python
Closer to English so easier to code and debug and understand
One to many relationship with machine code
Not processor specific so the same code works for many machines
Needs to be translated to machine code to be executed so slower to execute and less efficient
Low level
Adv and disadvantages
Machine code (binary)
Understood and executed by processor
Specific to processor - only written for one machine and can’t work on others
Assembly code (ADD, SUB) - easier to code than machine code
One to one relationship with machine code
Difficult to code and understand
Used for device drivers and embedded systems
Efficient and fast to execute as in control of the CPU
What language does the computer only understand
Machine code
Compiler
High level code directly translated to machine code to create an executable file
Interpreter
Translates and runs 1 instruction at a time, need every time to run the program, returns first error then stops (good for debugging)
Program runs slow as translating at the same time
What is an IDE
Integrated development environment - software used to help developers create code
Compiler
Translates all at the same time into one executable file, returns a list of errors once compiling is complete
It takes a long time but after its very quick
Features of an IDE
Several helpful features
Code editor - where you write code
Error diagnostic and debugging tools
Colour coded code to identify types of code
Auto-complete/correction/indentation
Breakpoints to stop code at certain points
Translator - allows source code to be executed
Structure diagrams pros
Show smaller tasks of larger problem
Easier to code
Multiple people code at one time as each task is indépendant
Easy to test as each task tested individually
Each task fixed or updated without affecting rest
Resume sub programs in future
4 ways to maintain a program and why
Easy to understand and change
Comments - explain key features of program
Indentation - separate statements to follow program easier
Variables - to keep track
Sub programs - easy to see parts and how they work to understand overall program
What is defensive design
To protect programs
Anticipate how users misuse programs and prevent it
Ensure code is well maintained
Reduce errors by testing
5 in put validation and what is it
Check if data meets a criteria before passing into program
Range check - data in specific range
Presence check - data has actually been entered
Format check - data has correct format
Look up table - data is checked against table of acceptable values
Length check - data is correct length
What is authentication
Confirm identity before allowing into network
Password and username
Too much puts users off
How to increase security via authentication
Strong passwords and change regularly
Limit number of authentication attempts before locking account
Ask random selection of characters from password
Two types of testing
Iterative - tested while developed - identifies smaller errors to prevent larger errors
Final testing - tested at end of development - so don’t have errors interacting with each other
Test plan
What your going to test and how
Anticipates potential issues
What are the four types of data’s for test plans
Normal data - what user is likely to input
Boundary data - values at the limit of what the program handles
Invalid data- inputs correct data type that should be rejected
Erroneous data - inputs incorrect data type that should be rejected