2.5 - Languages & IDEs Flashcards
What is a high level programming language?
A computer programming language used to write programs
—> Similar to natural human language
What are the advantages of a high level language?
- Easier to understand
- Leads to fewer errors
- Written faster
- Allows more powerful, complex commands than low level languages
What are the advantages of a low level language?
- Program written in this language is executed very fast
- Occupies less memory
- Used to control & manipulate specific hardware components
How are programs written in low level languages executed very fast?
High level languages must be translated into machine code before it’s understood by the computer
Low level languages don’t need to be translated
What are the types of low level languages?
- Machine code
- Assembly language
What is machine code?
The instructions that a processor understands and can act upon
—> Pure binary code
What is an assembler?
A program which translates assembly code into machine code
What is a translator?
Translates a program written in one language into another language (usually machine code)
What are the types of translator?
- Interpreter
- Compiler
What is an interpreter?
Converts high-level language one line at a time into machine code and executes it
What is an compiler?
Converts high-level language into machine code for execution at a later time
—> Entire program is converted at once
What is the comparison of Interpreters & compilers on execution method?
Interpreter - translates source code into machine code one line at a time
Compiler - translates all the source code into machine code at once
What is the comparison of Interpreters & compilers on execution speed?
Interpreter - slower
Compiler - faster
Why are interpreters slower than compilers?
Code must be reinterpreted each time as the program is run
Compiler is interpreted at once
What is the comparison of Interpreters & compilers on complexity?
Interpreter - smaller, simpler programs
Compiler - larger, complex programs
What is the comparison of Interpreters & compilers on error reporting?
Interpreter - interpreter would encounter errors & report it immediately to the user
Compiler - Compiler would analyse the entire program & record them in an error file
What is the comparison of Interpreters & compilers on repetition?
Interpreters - must reinterpret the program every time it is run
Compiler - requires analysis and the generation of the code only once
—> Have to be re-compiled after any changes have been made
What is an IDE?
A suite of tools that helps a programmer to write error-free, maintainable code
What is the editor?
Software that allows a programmer to enter & edit source code
Name some Editor features
- Automatic formatting
- Automatic line numbering
- Automatic colour coding
- Statement completion
Give some examples of some Debugging tools
- Trace
- Break points
- Error diagnostics & debugger
- Variable watch/ watch window
What is a trace?
What is error diagnostics & debugger?
Used to display information about an error and when it occurs
—> May also suggest solutions to help the programmer to find and fix the error
What are break points?
Enable a program to be paused or stopped at predetermined points
What is the purpose of a break point?
The programmer can then examine different parts of the running program
—> Information tells the programmer whether or not the program is working as expected
What is a variable watch?
Displays the current value of a selected variable
Variable can be watched line by line to see how the value changes
What is a runtime environment?
Allows a program to run on a computer system
—> Checks for runtime errors & allows users to test the program
When does a runtime error occur?
As the program is being executed
Give an example of a runtime environment
Java runtime environment
What does the use of a runtime environment allow?
Tools such as trace & breakpoint to be used
What is an emulation?
A software simulation of a computer system that can be made to run on another computer
What is a virtual machine?
A software implantation of another computer system or program for another machine