Programming concepts, high-level programming languages, low-level programming languages, machine code, hardware, characteristics of high/low level programming, and flow charts.

Programming concepts


Professional programmers use specialised skills and creativity to write programs. Some people find programming easy and fun. 

The programming concept you need to understand are described below.

Application software package

This is the end result of programming. When an application is running, the user interface is what you see and interact with by typing or using buttons. Applications software packages are created by programming with a high-level programming language and are used to solve problems and to entertain.

High-level programming language

A high-level programming language is one that is quite close to natural human language (rather then computer language, aka machine code). This is what most programmers use to write programs. 
Examples of high-level programming language are C# (pronounced ‘C Sharp’), C++, Java, and Visual Basic.

Microsoft Office applications, including excel also offer high-level programming functionality using VBA (virtual basic for applications). This allows users to add automation to office documentsby creating macros. 
For example, a user might program an excel macro to go through data, hiding rows that are not wanted making visible rows that are.
High-level programming languages are compiled into machine code so that the computer can understand and run it.

Low-level programming language
These languages are close to machine code, and therefore need less changes before a processor can actually run them (compared to high-level programming language). Low-Level programs are written using an assembler, which is simply a programming environment designed to help write these programs.

Each simple command you type into the program you are writing gets assembled into the equivalent machine code instruction. This is different from high-level language where a single line could compile hundreds of lines of machine codes that the processor will run to action that line of the code.

Machine Code

This is the actual binary code that the CPU can understand. Before any program you write can run on a computer, it must be translated (compiled or assembled) into machine code.

Hardware
The hardware is controlled by software as the CPU decodes each machine code instruction to carry out actions such as adding two numbers together, displaying part of the user interface on the screens or loading a document into RAM from the disk.

Characteristics of high-level programming language

High-level programming languages are powerful and easy to understand.

Programs written in a high-level language are much closer to spoken language then low-level, as well as being a lot more intuitive to use.

High-level programming languages have several ways of working, including:

-          Imperative code – this is used in most languages, both older and modern. In this type of code each program statement is a step towards handling the inputs processing and outputs.

-          Procedural programs – These have definite start and end points. These language were normal before GUI operating systems, as usually have a single starting point then follow as a sequence. Modern programs respond to events so can have many start points within the code.

-          Event-Driven programs – these respond to events such as a mouse click. These are the current approach for modern programming because they need to produce responses to the great variety of events that GUI operating systems provide.

-          Object-orientated programs (OOP) – These view programs as a collection of objects. Such as a database record, and not as a list of tasks in a procedural programming. Each object can be viewed as an independent ‘machine’ within a distinct role or responsibility , which is capable of receiving messages, processing data, or sending messages to other objects.

Characteristics of low-level programming language

Assembly language is written using an assembler, which helps the programmer by checking for errors in the mnemonics before compiling the program into machine code.

Machine code is binary bytes so could be written without an assembler by typing binary numbers direct into memory. However, this would be very difficult as the programmer would only see the program as numbers. The mnemonic abbreviations in assembly languages make understanding the program much easier.

Flow charts
You can use flow chart to help design a program. 

A flow chart is a diagram that shows how a program works and the routes can be taken through it.

A flow chat shows where the program starts and where decisions are taken. Processing operations, inputs, and outputs.

Process – Used to represent a calculation or general processing operation carried out by the program.

Terminator – Shows where the program starts or finishes.

Decision box – used in any place where the program makes a test to decide on a choice of directions to run the next code.

Data (input/output) – Represents any part of the program that takes data in or shows prints or outputs data.

Connector – aka flow line. These lines connect other parts of the flow chat to show the routes the program can take. Flow lines usually have an arrow at one end to the show the direction the program takes. If there is no arrow the direction will be either downwards or to the right.



Comments

Popular posts from this blog

The main components of a computer with brief descriptions.

What is ROM? (Read only memory)