ProgrammingSequence, selection, iteration, procedures, functions, modules, parameters, compilers, interpreters


Syllabus Detail

  • Types of languages; 1st Gen, 2nd Gen, 3rd Gen, 4th Gen, procedural, non-procedural, object-oriented, scripting

Background

  • Programming is the process of writing computer programs
  • A programming language is a constructed language that is designed specifically to communicate with a computer system
  • Programming languages help us to translate our ideas and thoughts in to functionial computer programs

 

Programming Generations

First Generation (1GL) Machine Language

  • Started in the 1940s
  • First generation programming languages are machine-level languages, ie to make the CPU work and connect hardware. Not many apps in those days.
  • This means that there were no compilers or assemblers to translate human-readable code in to binary
  • Programming instructions (in the form of binary) were entered through the front panel switches of a computer system
  • Instructions were entered directly in to the CPU for processing
  • As these instructions were binary based, programming was much harder to interpret and understand for the human programmer
  • Pros; achieved the objective to get CPU working
  • Cons; many errors, slow compared to these days, limited memory in those days, difficult of programmers
  • Examples; Motorola 68000 used in early macs, Intel 8088 used in early window machines
  • Want to write code in 1GL? Learn binary here

 

Second Generation (2GL) Assembler Language

  • Started in the 1950s
  • The second generation of programming languages introduced an assembler
  • This assembler's job was to convert code that could be written and understood by a human in to binary that could be intepreted by a computer
  • The assembler's ability to read these instructions is entirely dependent on the processor's architecture and make
  • 2GL programming languages allow for better understanding and interpretation for the human programmer
  • Pros; programmer could read it and make it
  • Cons; Had poor program flow control
  • Examples; RISC, CISC, x86
  • Examples of code include identifying the memory location for placement of numbers, the calculation and next is the result and the storage location for that result.

 

Third Generation (3GL) High Level Language

  • Started in the 50s
  • Third generation programming languages are known as high-level languages
  • These languages are much more machine independent and programmer friendly
  • Has program flow control such as if-else statements, arrays and more structured programming
  • High-level languages are often English-based and provide the programmer with a broad understanding of the code
  • Pros; programmer friendly
  • Cons; need to know lots of programming
  • Examples; C, C++, Java and BASIC are third generation programming languages
  • Examples of difference between 2GL and 3GL see here

Fourth Generation (4GL) High Level Language

  • Started in the 1970s
  • They are built to work more with databases
  • Pros; programmer friendly, support databases, support web-development
  • Cons; increased developer learning
  • 4GL programming languages can be seen as more programmer-friendly 3GL languages
  • They focus on bringing power and versatility to programming (e.g. the ability to adapt to more types of processors / computers)
  • These languages are written to operate with larger collections of data rather than just bits and bytes
  • Examples are SQL, Coldfusion, CSS
  • Example syntax; Extract all Sales WHERE price < $200

 

Procedural & Non-procedural

  • Procedural Languages
  • These languages are seen as the traditional programming languages
  • They're based on algorithms and logical step-by-step processes
  • Procedural languages make use of control structures such as iteration and selection to perform a task
  • In these languages, the programmer tells the program what and how to do it
  • Example languages: C++, COBOL, FORTRAN, ALGOL

  • Non-procedural Languages
  • These languages only care for the what of the program as opposed to how to get the results
  • Non-procedural languages are used to specify the conditions that the answer should produce, but now how to go about it
  • These languages are generally constructed in the form of commands entered by the programmer
  • Example languages: SQL, Visual Basic

 

Object Oriented Programming Languages

  • Object-oriented programming (OOP) is a modern concept of programming
  • It focuses on data structures that contain data in the form of fields (known as attributes)
  • Code is written in the form of procedures known as methods
  • An object is a structure that contains both data and procedures
  • A class defines the data format and available procedures (methods) for a given type or class of object
  • These languages work by allowing objects to interact with one another
  • Example languages: Python, C++, Objective-C, Delphi, Java, Swift, Ruby, PHP

 

Scripting

  • Unlike programming languages, scripting languages are interpreted rather than compiled
  • These languages are interpreted one command at a time
  • They're commonly used to add functionality and enhanced features to websites
  • Unlike other programming languages, web-based scripts are run on the end-user's web browser as opposed to the server
  • Example languages: JavaScript, ASP, JSP, PHP, Perl, Python

 

Further Research

  • Read a List of Programming Languages on WikiPedia here
  • Read the article Procedural and Non-Procedural Languages from EnggPedia here
  • Read an Introduction to Object Oriented Programming Concepts and More on Code Project here
  • Read the differences on Scripting and Programming here

 

Worksheet and Practice (TBA)


 
Found an error or enhancement? Please fill out this contact us form.