



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of the history of programming, focusing on the development of programming languages from assembly language to high-level languages. It covers the origins of programming, the evolution of assembly language, the introduction of high-level languages, and the impact of desktop computers on programming. Students of computer science and programming will find this document useful for understanding the historical context of programming and the development of programming languages.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




1-2 Introduction to Computer Programming Using C#
A computer, in its simplest form, is nothing more than a collection of silicon, plastic, metal, glass, and wire. When you turn it on, it does precisely what it's been instructed to do - nothing more, and nothing less. That's where programming comes in. A program is a set of instructions that tell the computer what it's supposed to do; programming is the process of preparing these instructions. Because computers interpret their programs very literally, programmers need to be quite explicit in the directions that they prepare.
Since the first computers were developed in the 1940's, the discipline of computer programming has undergone a continuous evolution. In those days, computers were often programmed by means of large patch panels, using wires to represent individual instructions. Early on, though, it was recognized that flexibility would be increased if computer programs could instead be encoded as numeric data, and stored in the computer's memory. While an improvement over patch panels, these machine language programs were still difficult to work with. Even then, most computers used binary numbers, and the machine language programs were nothing more than strings of zeros and ones.
To streamline the programmer's job, special assembly languages were developed. Rather than having to remember, for example, that the binary pattern 00101010 is the instruction that tells the computer to add two values, while the pattern 00101011 stands for subtract, the assembly language programmer uses special mnemonic names, such as ADD or SUB. In addition, assembly languages introduced the concept of using labels to stand for addresses within the computer's memory. Thus, the instruction:
ADD A,B
might be used to tell the computer to add the values in memory locations 123 and 147, rather than the binary form:
00101010 01111011 10010011
Of course, the computer didn't, and still doesn't, understand assembly language directly. Instead, special programs, called assemblers , were (and are) used to translate assembly language to its binary equivalent.
Although assembly language programming is still an option with computer systems, it's used only sparingly, primarily for performing very low-level tasks where direct communication with the computer's hardware is required. Most programming is instead done using more sophisticated languages. This is because assembly language is still quite difficult to work with, requiring even the simplest tasks to be broken down into sequences of several, or even several hundred, instructions. Also, virtually every computer system has its own unique assembly language. To
Chapter 1: Foundations 1-
run an existing assembly language program on a new computer system requires translation of the program into the new system's assembly language - often a formidable task.
High-level , machine independent programming languages were first introduced in the 1950's. Whereas each instruction in an assembly language represents a single machine language instruction, a single high-level language instruction will usually translate into several machine language instructions. This implies, of course, that high-level languages are far more expressive than assembly languages. It also implies that the translation process required to convert programs written in these languages into a form that the computer can process is far more complex.
Actually, there are two strategies for translating high-level languages. The first, called compiling , translates programs fully into machine language. Once translated, the compiled program can be run at any time, without any additional translation required. In contrast, other languages are interpretive. When a program written in an interpretive language is run, an interpreter program reads one instruction at a time, and determines how to carry out the required action.
To better understand the difference between compiling and interpreting, imagine that you have an article written in a foreign language. You could hire someone to translate the article to English, and give you a written copy of this translation. This is what a compiler does. Alternatively, you could hire someone to read the article aloud, translating it to English as they read. This is what an interpreter does. Notice the important difference between these two approaches. When the article is "compiled" for you, you can refer back to the translated version at any time; the "interpreted" version, however, is not retained, and you'd need to seek out your interpreter again if you wanted to review the article's contents.
In recent years, it’s become increasingly common for programming language implementations to adopt a hybrid translation model. Rather than compile a program completely to machine language, these hybrid-model compilers translate into a “generic” machine language, which is then interpreted on the host computer. Early on, this strategy was adopted to simplify the translation process on small computers with very limited resources, since full translation can be quite complex, and placed a heavy burden on these machines. As even the smallest computers acquired larger memories and faster processors, this practice became less attractive. Recently, though, the widespread use of the Internet has led to a new-found interest in the use of this model. By translating web applications into a generic intermediate form, it’s possible to run a single application on a variety of different hardware environments without having to re-compile the application for each target environment; instead, each hardware environment has its own interpreter that can be used to run the program on that platform. Java was probably the earliest widely used language that adopted this model to support downloadable software applications. This same model is used in C#, as well.
Chapter 1: Foundations 1-
One area where there's been a great deal of variation between programming languages is in the mechanisms for transferring data between the computer and the outside world. In FORTRAN, the value of AVG could be displayed, with 1 digit after the decimal place, using the instructions:
WRITE (6,1)AVG 1 FORMAT (F5.1)
In the WRITE instruction, the number 6 is a reference to unit 6, which is, presumably, associated with some output device. The value 1 tells the computer to use the FORMAT statement with the label 1 to specify the appearance of the result. In this instance, the computer is told to display the value with 5 total character positions, including the decimal point and 1 digit after the decimal point. In Pascal, the same instruction would be:
Writeln (Avg:5:1);
while in C++, it would be:
cout << setw(5) << setprecision(1) << avg << endl;
One topic that often confuses beginning programmers is the wide variety of programming languages that are available. While we've looked briefly at some of the similarities and differences between different languages, we haven't really addressed the reasons for the existence of so many languages.
When computers were first introduced, they were primarily used to solve complex mathematical problems. Consequently, the earliest focus, reflected in FORTRAN, the first widely used programming language, was the efficient expression of these problems. Soon, however, business clients began to use computers more for their ability to organize and manage data, and languages such as COBOL, which features strong data organizational capabilities, were introduced. Although a number of other languages were also developed, these two languages, along with a variety of assembly languages dialects, dominated the programming landscape through the 1960's and early 1970's.
During the late 1960's and early 1970's, computer scientists began to seriously debate the relative strengths and weaknesses of existing programming languages. Since the structures of most programming languages are strictly controlled by standardization bodies, it was easier for researchers to develop new languages to try out alternative approaches to remedying the perceived weaknesses. As a rule, the innovations in these languages focused on two major areas of language design - control structures and data structures.
1-6 Introduction to Computer Programming Using C#
A control structure is a programming construct that controls the execution of subsequent programming instructions. Typically, control structures are classified as either selection structures, which allow the computer to perform one of several alternative actions, or repetition structures, which allow the computer to perform some action repeatedly. FORTRAN’s control structures were quite weak, perhaps because, as was mentioned before, the primary emphasis in FORTRAN was on solving mathematical problems. In fact, FORTRAN’s control structures weren't much different from those available in assembly language. While COBOL's control structures were somewhat better, the business orientation of the language kept it from having much influence on scientific areas of programming.
A data structure, on the other hand, is a collection of related data items, along with an appropriate set of operators for manipulating those items. Again, FORTRAN has very little facility for managing data structures. It recognizes basic numeric data items, both with and without fractional parts, and in some cases also provides support for complex numbers. The only level of organization available beyond isolated instances of these items is the array, or table. COBOL is stronger in this area, due to the greater need to organize related data items to support business applications. Still, there is no facility for defining generalized data structures, nor is there any way to bind a set of operations to an associated structure.
By the end of the 1970's, most educators had come to the conclusion that a better language for teaching new programmers was needed, and the most popular choice was Pascal. Pascal was designed specifically for teaching, and provides a strong set of control structures, a reasonable level of data structure support for the time, and, perhaps most importantly, a small, and relatively simple, instruction set.
Because of its teaching orientation, Pascal lacks some of the facilities needed for acceptance by professional programmers. Consequently, there was a fairly steady migration in the 1980's towards another language, C. Although somewhat similar in structure to Pascal, C has a number of the facilities that were perceived as necessary for widespread commercial use. Like Pascal, though, C lacks the facility for connecting a data structure with its associated operators.
As the 1980's progressed, another mini-revolution struck the programming community. This was the trend towards object-oriented programming. Stripped of the associated hype, object oriented programming is really little more than the incorporation of associated operators into a data structure. Perhaps the most widely used languages today that fit this object-oriented model are C++ and Java; C#, which borrows heavily from both Java and C++, is also an object-oriented programming language.
In both Pascal and C, it's possible for a programmer to define a new data type, such as a matrix. In C++, it's not only possible to define a matrix, it's also possible to extend the basic arithmetic operators, like + and -, to work with a matrix. Thus, it's possible to extend the language in a natural way, customizing it to support the needs of a particular organization or application.
1-8 Introduction to Computer Programming Using C#
Once a basic screen layout is defined, the programmer must decide which of the possible events will be recognized, and develop event handlers for each of these allowable events. Programs that follow this model no longer exhibit the hierarchical structure characteristic of traditional applications. Instead, they appear as a loose collection of modules that communicate with each other by way of shared data items. Ironically, first-time programmers typically have a far easier time adjusting to this revised model of programming than do experienced programmers.
Of course, as programmers needed to refine their view of the programming process, languages have needed to adapt to this change. Quite often, support for graphical user interfaces has been simply tacked on to an existing language platform; Microsoft’s first “Visual” implementations of BASIC and C++ adopted this model. In other cases, special graphical interface libraries have been built that can be integrated into the programmer’s preferred language environment, and can often be used with a variety of different languages.
In Java, and now in C#, support for graphical interfaces is tightly woven into the language itself. While it’s not actually necessary to develop applications that use of a graphical interface, the facilities needed to support that interface are automatically made available to the programmer as a natural part of the language.