ODL 115 TEAM D Coursework 1
Question 1.(i).
Some commentators on the development of programming languages characturise thier history as a linear progression from 'First generation' languages (the machine languages of early computers), through second, third, fourth and fifth generations. Explain and illustrate briefly how the concept of a "generation" is used to describe the history of programming language development.
Answer
The development of programming languages has been a linear progression. There are generally  considered to be five generations of programming languages, the term generations being loosely  defined by time, but more specifically by programme type and advances in programming technology.  However the end of a generation has not been the end of a programming language, indeed many languages  from different generations are still being used and developed today. Machine code -  known as the  first generation language, is still the only language that computers actually recognise, the different  languages that we programme in are essentially interpreters, translating instructions we understand  into machine code which the computer understands.
If we look at the early mainframe computers of the 1960's, the programs written then would only  work on a computer that was configured in a specific way, and were only for a specialised purpose.  This made programming very complicated, expensive and time consuming. As time went on and computer  hardware was developed and memory became cheaper and more readily available, so programming languages  were developed that could be used on these computers. These languages were less complicated than the  earlier ones, and easier to write and code, and so it became less expensive to produce programs. From  the 1980's onwards, when the PC was invented and developed more people had access to computers, and  programs were being written that were able to be altered and manipulated by non-programmers. They were  developed to enable algorithms to be expressed in a form that can be read and understood by humans, and  easily be converted into machine-code.
First Generation Languages
The First Generation (IGL) languages were developed from 1937 until the early 1950's, and were called  low-level languages and was in fact machine code. Machine code is based on numerically coded instructions  using strings of 0's and 1's. The 0's and 1's being essentially "on" or "off" which the computer is able to  understand. An example of what a machine language instruction would look like is this:-

  01110010100011011011010100111010
The language was difficult to remember and manipulate into programmes. As well as being unwieldy to use,  problems were increased as each machine (or rather its CPU) had it's own language. To overcome some of  these problems, programmers would write out their code using notation in terms such as "add" or "a",  "multiply" or "m". This would give them one essential programme which they then interpreted into code for  the different machines they programmed. This use of written notation evolved into the next step up to second  generation languages.
Second Generation Languages
The Second Generation (2GL) languages were developed from the early 1950's until the early 1960's, and  were called Assembly Languages, and used the simple command words which had evolved when writing  1GL out in longhand. They were so called because they used assemblers which work by going through the  programme and directly translating the command words into their machine code equivalent to provide step- by-step instructions for the processor to carry out. An example of a 2GL instruction would look like this:-

  ADD 10,4     or     M 12,3
2GL's could create compact, fast code, they are also far less machine dependant, though they are definitely  operating system dependant. Because of these dependencies there are literally hundreds of different  assembler languages, some examples of 2GL's are Autocoder, MVS and BAL (basic assembler language)  which IBM's mainframe assembler. These programs were the first that could provide abstraction and  generalisation, although strings could only be used for output. Both 1GL and  2GL are called low-level  languages, because for every command of the language there is a corresponding instruction, whereas higher- level languages such as C combine several machine code instructions to make one command. However  2GL's were still extremely complex and time consuming languages to programme in.
Third Generation Languages
The Third Generation (3GL) languages were developed by computer scientists from the early 1960's until the  early 1970's, and were the first to be called high-level. It was less time consuming to produce the code, and  so therefore less costly to produce programs. Programmers didn't need to know the internal architecture of  the computer that they were programming, so it opened up the field of programming to more people.
3GL's use compilers to translate the statements into machine code, rather than directly translating the  language as the assemblers did, compilers parse through a programme analysing its syntactic structure, it  then parses through systematically building the relevant machine code. The way the compiler works means the  programmes are not as rigidly sequential as they were in previous languages. 3GL are mostly machine  independent, because the statements of the language don't refer to the attributes of any particular machine.  The compiler also has certain restrictions imposed depending upon the computer being used. These  restrictions are then shown as conditions of the language being translated, for example:- the size of the  computer's registers and memory cells will affect the size of the integers that can be easily manipulated.  Though the program may need to be modified for use on different computers. In order to try and redress this  situation, ANSI and the ISO have adopted and published standards for many popular languages.
Examples of 3GL's are Ada, C, Prolog, Java, Fortran, and Cobol. And an example of a Java statement might  look like this:-
Class HelloWorldApp {
         Public static void main(string[] args)    {

              System.out.println("Hello World!");

          }
     }
In the above code we can see that the class name of the program is HelloWorldApp, it's main method is to display a line on the screen (System.out.println), which reads "Hello World!".
3GL's also saw the introduction of OOP - object orientated programming, used by languages like Java and  C++. The main difference between OOP and procedural languages is its data type. In procedural language the  the data has operations performed upon it. In OOP the data is "active" and therefore comes complete  with its own structure and tasks that can be performed upon it. Simply put this would be mean that if in  passive programming you may have a data item "shape" that would be all the information you have, you then  have to add more data to specify what shape "shape" is, what colour etc. In OOP the data "shape" would  come packaged with the tasks to define its shape, colour, size etc built into it, i.e. it would effectively  ask what shape am I, what colour am I. This reduces the programming that needs to be done as every time you  refer to the object "shape" all these other requirements to define it further come with the object.
As can be seen programming in 3GL though easier than 1GL & 2GL still requires a large amount of  programming knowledge and familiarity with the programming language itself.
Fourth Generation Language
The Fourth Generation (4GL) languages  were developed between the early 1970's and early 1980's, this  development was driven by the increasing use of computers in business. To enable software to be developed  more quickly, and to provide a user-friendly programming language so that more people could become  involved in the programming process. These are the languages used to produce macros, query databases and  report writing. These languages usually come in the form of software packages such MS Access, MS Excel,  Oracle and Visual Basic.
An example of a 4GL statement would be:-

  SORT data numerically in ascending order.
This is fairly self-explanatory, in that it resembles english, and as is stated, it is  instructing the computer to sort whatever data is input to it into ascending numerical order.
In fourth generation languages the programmer can say what has to be done, rather than how to do it. In fact  these languages are so close to natural language and so easy to use, that many people who do use them are  unaware that they are programming. These programmes run slower than earlier generations because their  machine-code equivalent is longer and more complicated to execute, but this is no longer so important  because of the speed of the microprocessor.
Fifth Generation language
The Fifth Generation languages were developed from the early 1980's, and they are component based and  visual. That is to say that they consist of components and events, and their objects encapsulate their  methods. They "pass messages" to objects, and allow for event-handling. They are two way tools, allowing  interaction, and rapid application development. They are associated with Artificial Intelligence (AI),  and are built up through logic programming. They model real world situations and are non-procedural.  They build up a knowledge base (or database), where relationships are represented, and then draw logical  conclusions from user input. The database searches its list of facts and then returns an answer. They  support symbolic user input on computers that use parallel processing rather than sequential processing.  Examples of these languages are Delphi, Visual Basic, Java and PROLOG. Java is completely machine  independent, and the main advantage of a program written in Java is that it will run on any computer,  no matter which operating system it uses. 5GLs can also use visual objects on screen which can be  activated using a mouse or even touch screen to represent tasks, opening up programming to an even wider  audience.
An example of what a 5GL language can do might look like this (notice the similarity to FOL)
SameHouse(max,sam)
sam lives in the same house as max
SameHouse(sam,jim)
max lives in the same house as jim
Given this information you then input the following queries:
QuerySameHouse(max,jim)
Does max live in the same house as jim?
Response
Yes
Who lives in the same house with max?
WhoLivesSameHouse(max)
Response
jim, and sam
You can also add rules i.e. SameStreet(a,c): SameHouse(a,b),SameHouse(b,c)
Now you can ask:
SameStreet(max,jim)
does max live in the same street as jim?
Response
Yes
As you can see the 5GL is using AI, i.e. it is able to build and manipulate spreadsheets without the  user having to specify exactly what it must do.
Conclusion
New programming languages are constantly being developed, as is computer hardware. Processing speeds  are getting faster, graphics are improving, and new and more varied applications are being developed  for computers. The first, second and third generation languages were noticeably faster and more  efficient ways of programming. The increased speeds of new machines have taken away much of the need  for faster more efficient languages and as a result fourth and fifth generation languages have not  been about improving the technology of programming itself, rather they have been focused at improving  the user interfaces and increasing the ease with which people can programme. Indeed as the improvements  continue we see some blurring and overlapping of the high level language generations , indeed different  sources will call Java a 3GL or a 5Gl language respectively. Whereas it is more likely that Java has  been developed from 3GL to 5GL. With hardware advancing as quickly as it is, the only restrictions on  the evolution of future generations of programming languages would appear to be time and the limits of  the human imagination.
References:
Question 2
[1] Brookshear, J. G., "Computer Science An Overview", 2000
[2] White, R., "How Computers Work", Millennium Edition
[3] "A Brief History of Computer Technology".
http://csep1.phy.ornl.gov/ov/node 8.html
[4] "Information Technology Foundation Course", World ORT, 2000.  
http://doit.ort.org/course/languages/
[5] "History of Computing", IEEE Computer Society, 2001.
http://www.computer.org/history/development/
[6] "Webopedia Online Computing Dictionary".
http://www.webopedia.com/
[7] "Wikipedia Online Computing Dictionary".
http://www.wikipedia.com/wiki/
[8] "FOLDOC Free On-line dictionary of computing".
http://foldoc.doc.ic.ac.uk/foldoc/index.ht
Question 3
To Top
Hosted by www.Geocities.ws

1