Computational Thinking (III) - Design, Testing and IDEs Flashcards
For a computer language to be processed what must happen?
It needs to be translated into machine code
What are the advantages of high level programming languages?
They are close to the spoken and written language of the programmer making it much easier to work with
Name some high level languages
Python
Java
C++
C#
Visual Basic
JavaScript
Programs written in high level language are known as what?
Source code
What are low level languages?
They sit close to the computer’s instruction set
What are the two types of low level language?
Machine Code
Assembly Language
What is machine code?
Instructions that a process understands and can act upon
What are the advantages of writing in machine code?
More flexibility
What are the disadvantages of writing in machine code?
Very difficult to write in, understand and debug (consisting of binary and hexadecimal)
When programmers need direct control of machine code, what is used?
Another low level language – assembly language
What does assembly language use?
Mnemonics, for example:
LDA – load a value from a memory address
STA – store a value in a memory address
ADD – adds the value held in a memory address to the value held in the accumulator
SUB – subtracts from the accumulators the value held in a memory address
MOV – moves the contents of one memory address to another
What is Opcode and Operand?
Opcode – actual instructions
Operand – this is a value that the instruction uses or manipulates
What are translators?
A program that converts source code (high level language written program) into object code (a form the computer understand)
What are the three types of translator?
Compilers
Interpreters
Assemblers
What is a compiler?
A compiler takes the source code as a whole and translates it into object code, in one go
What is an interpreter?
An interpreter translates source code into object code one instruction at a time
What is an assembler?
An assembler translates assembly language into object code
What is an IDE?
Tools which are gathered together to help write programs
What is the Python IDE?
IDLE
What are editors?
Editors are software which allow programmers to write and edit code. Editors are often fairly simple, but usually offer facilities such as:
Automatic line numbering Colour coding Auto-correct Auto-suggest Auto-indent
What do editors help with (and are unable to help with)?
Editors help the readability of code
They are unable to help identify errors
What is a runtime environment?
A runtime environment (RTE) is special software that allows a program to run on a computer, even if it is not designed to run on it
What debugging tools exist to locate and fix errors?
Breakpoints (pause / stop code to check)
Variable tracing (identify changing variable values)
Syntax error pinpoint (error trapping)
What is the purpose of defensive design?
To ensure that a program runs correctly and continues to run no matter what actions a user takes