Please enable JavaScript.
Coggle requires JavaScript to display documents.
unit.6 principles of programming - Coggle Diagram
unit.6 principles of programming
high level languages
The names of variables/identifiers can be long and meaningful, making programs easier to understand
They cthey are easier to understand, learn and program, as their commands are similar to natural languages like English
losely resemble pseudo-code algorithms
global and local variables
Local variables are only accessible within limited parts of a program/subroutine/function/method .
Global variables are accessible throughout the entire program.
It is better to use local variables whenever a variable is not needed throughout the entire program as it global variables use memory whenever the program is loaded whether the variable is needed or not
It is harder to debug errors involving global variables as global variables are liable to be changed within any subroutine, even if this was not initially planned
Subroutines are easier to use in other programs
low level languages
Programming in a low level language such as assembly code requires knowledge of the internal structure of the CPU and is therefore very specialised.
Assembly code uses mnemonics (an abbreviation for an operation) and is converted to machine code for execution using an assembler.
The program statements are written for a particular type of CPU and make direct reference to specific internal registers of a processor.
Source code written in a low level language is not portable, but it more efficient and will run faster than programs produced using a high level language.
uses of high and low level languages
High level languages are used when execution speed is not critical - e.g. in common productivity applications, such as a word processor, or spreadsheet.
Most modern applications such as commercial database packages, operating systems, e-commerce software and social media apps are developed using a high level programming language.
Programmers may wish to program directly in machine code or assembly code when programming device drivers or embedded systems, or where fast execution speeds are critical.
Professional game developers may need to use console specific development software, which is likely to include low level features for optimum performance.