Computer programming

From New World Encyclopedia
Jump to: navigation, search


Computer programming (often simply programming or coding) is the craft of writing a set of commands or instructions that can later be compiled and/or interpreted and then inherently transformed to an executable that an electronic machine can execute or "run." Programming requires mainly logic, but has elements of science, mathematics, engineering, and—many would argue—art.[1]

Contents

In software engineering, programming (implementation) is regarded as one phase in a software development process.

Brief History of Programming

Wired plug board for an IBM 402 Accounting Machine.

The earliest programmable machine (that is, a machine that can adjust its capabilities based upon changing its "program") can be said to be the Jacquard Loom, which was developed in 1801. The machine used a series of pasteboard cards with holes punched in them. The hole pattern represented the pattern that the loom had to follow in weaving cloth. The loom could produce entirely different weaves using different sets of cards. This innovation was later refined by Herman Hollerith of IBM in the development of the famous IBM punch card. These were used with a variety of machines called unit record equipment to perform data processing tasks. The unit record equipment were programmed by changing the wiring of plug-boards. Early computers used similar programming methods.

A box of punch cards with several program decks.

The invention of the Von Neumann architecture allowed programs to be stored in computer memory. Early programs had to be painstakingly crafted using the instructions of the particular machine, often in binary notation. Every model of computer would be likely to need different instructions to do the same task. Later assembly languages were developed that let the programmer specify each instruction in a text format, entering abbreviations for each operation code instead of a number and specifying addresses in symbolic form (e.g. ADD X, TOTAL). In 1954 Fortran, the first higher level programming language, was invented. This allowed programmers to specify calculations by entering a formula directly (e.g. Y = X**2 + 5*X + 9). The program test, or source, was converted into machine instructions using a special program called a compiler. Many other languages were developed, including ones for commercial programming, such as COBOL. Programs were mostly still entered using punch cards or paper tape. See computer programming in the punch card era. In the mid-1970s, mass storage devices and computer terminals became inexpensive enough so programs could be created by typing directly into the computers. Text editors were developed that allowed changes and corrections to be made much more easily than with punch cards.

One of the earliest forms of electronic programming used a type of rack with wires and washers to program the computers. The washer was placed on a cross section of wires and depending on if it was placed at a left angle or a right angle, it would register as a 0 or 1. This was the origin of the term "bug" in a program. When the computers were operating, they would generate a lot of heat and literal bugs would fly into the wires shorting them out. Then the programmers would have to pull the racks out and find the dead bugs to remove them.

As time has progressed computers have made giant leaps in the area of processing power. This has brought about newer programing languages that are more abstracted from the underlying hardware. Although these more abstracted languages require additional overhead, in most cases the huge increase in speed of modern computers has brought about little performance decrease compared to earlier counterparts. The benefits of these more abstracted languages is that they allow both an easier learning curve for people less familiar with the older lower-level programming languages, and they also allow a more experienced programmer to develop simple applications quickly. Despite these benefits, large complicated programs, and programs that are more dependent on speed still require the faster and relatively lower-level languages with todays hardware. (The same concerns were raised about the original Fortran language.)

Throughout the second half of the twentieth century, programming was an attractive career in most developed countries. Some forms of programming have been increasingly subject to offshore outsourcing (importing software and services from other countries, usually at a lower wage), making programming career decisions in developed countries more complicated, while increasing economic opportunities in less developed areas. It is unclear how far this trend will continue and how deeply it will impact programmer wages and opportunities.

Basis of Computer Programming

The binary system was used from the earliest examples of computer programming. Basically, there is either something there or not. That is how the first punch cards were used. A card reader would look at different locations on the card to see if there was a hole or not. If there was a hole, it would be considered a 1, if not, it would be a 0.

The way a computer processes a program is by interpreting binary code. The memory is divided into locations and given addresses with hexadecimal numbers. The addresses are then given a value of 0 to 255. Based on the value of the address the computer does a process. The reason Hexadecimal is used is because it can hold binary code to the 8th place. This is called a byte and can be interpreted in binary. One byte can be equal to 0 (0) to 255 (FF). Take the number 246 for example, in binary it is 11110110 while in Hexadecimal, it is F6. This was the basis for the ASCII code system, with one hexadecimal number per character for a total of 255 characters. Computer memory is based on 1000 bytes of information, one Kilobyte. So for example, a specific number at a specific address will generate an absolute result. This controls the computer completely whether it is input or output.

Programming languages

Main article: Programming language

The programming language that a computer can directly execute is machine language (sometimes called "machine code"). Originally all programmers worked out every detail of the machine code, but this is hardly ever done anymore. Instead, programmers write source code, and a computer (running a compiler, an interpreter or occasionally an assembler) translates it through one or more translation steps to fill in all the details, before the final machine code is executed on the target computer. Even when complete low-level control of the target computer is required, programmers write assembly language, whose instructions are mnemonic one-to-one transcriptions of the corresponding machine language instructions. People that do the programming are called computer programmers. Programmers must write, test, and give instructions to programs to perform a function.

Different programming languages support different styles of programming (called programming paradigms). Common languages are C++ and Java but there are many more. Part of the art of programming is selecting one of the programming languages best suited for the task at hand. Different programming languages require different levels of detail to be handled by the programmer when implementing algorithms, often in a compromise between ease of use and performance (a trade-off between "programmer time" and "computer time").

In some languages, an interpretable p-code binary (or byte-code) is generated, rather than machine language. Byte code is used in the popular Java programming language by Sun Micro-systems as well as Microsoft's recent .NET family of languages (MS.NET's P-Code is called the Intermediate Language or IL) and Visual Basic previous to the .NET version.

A Chronology of Computer Programming Languages

ca. 1946 - Konrad Zuse, a German engineer working alone while hiding out in the Bavarian Alps, develops Plankalkul. He applies the language to, among other things, chess.

  • 1949 - Short Code, the first computer language actually used on an electronic computing device, appears. It is, however, a "hand-compiled" language.
  • 1951 - Grace Hopper, working for Remington Rand, begins design work on the first widely known compiler, named A-0. When the language is released by Rand in 1957, it is called MATH-MATIC.
  • 1952 - Alick E. Glennie, in his spare time at the University of Manchester, devises a programming system called AUTOCODE, a rudimentary compiler.
  • 1957 - FORTRAN—mathematical FORmula TRANslating system—appears. A general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing. Originally developed by John Backus of International Business Machines Corporation (IBM) in the 1950s for scientific and engineering applications.
  • 1958 - FORTRAN II appears, able to handle subroutines and links to assembly language. John McCarthy at M.I.T. begins work on LISP—LISt Processing.

The original specification for ALGOL appears. The specific action does not describe how data will be input or output; that is left to the individual implementations.

  • 1959 - LISP 1.5 appears. A family of functional, sometimes scripted, programming languages often used in AI.

COBOL is created by the Conference on Data Systems and Languages (CODASYL).

  • 1960 - ALGOL 60, the first block-structured language, appears. This is the root of the family tree that will ultimately produce the likes of Pascal. ALGOL goes on to become the most popular language in Europe in the mid to late 1960s.

Sometime in the early 1960s, Kenneth Iverson begins work on the language that will become APL—A Programming Language. It uses a specialized character set that, for proper use, requires APL-compatible I/O devices.

  • 1962 - FORTRAN IV appears.
  • 1963 - ALGOL 60 is revised.

Work begins on PL/1.

  • 1964 - APL\360 is implemented.

BASIC (Beginner's All purpose Symbolic Instruction Code) was invented by John Kemeny and Thomas Kurtz of Dartmouth College. It became the most widely used language when microcomputers first hit the market, in the '70s and '80s. Many dialects of BASIC have been produced. Because early dialects lacked important features such as strong data typing, procedures and functions, BASIC was typically seen as a language for learning programming and prototyping rather than for enterprise development. This is not true today since many BASIC compilers offer all of the structured programming advantages as other languages.

PL/1 is released.

  • 1966 - FORTRAN 66 appears.

LISP 2 appears.

Work begins on LOGO at Bolt, Beranek, & Newman. The team is headed by Wally Fuerzeig and includes Seymour Papert. LOGO is best known for its "turtle graphics."

  • 1967 - SNOBOL4, a much-enhanced SNOBOL, appears.
  • 1968 - ALGOL 68, a monster compared to ALGOL 60, appears. ALGOL 68 proves difficult to implement.

ALTRAN, a FORTRAN variant, appears.

COBOL is officially defined by ANSI.

Niklaus Wirth begins work on Pascal.

  • 1970 - Sometime in the early 1970s, Charles Moore writes the first significant programs in his new language, Forth.

Work on Prolog begins about this time.

Also sometime in the early 1970s, work on Smalltalk begins at Xerox PARC. The most important fundament for object oriented programming. It started a new programming paradigm, which influenced the whole art of programming significantly. Smalltalk is a pure object oriented (OO) language with a minimalistic syntax. This is possible because very consequent mostly everything is done inside the class library. Even standard control structures are implemented in the class library. There exists nothing else than objects. Not many other OO-languages have this clearness and simplicity. Led by Alan Kay. Early versions will include Smalltalk-72, Smalltalk-74, and Smalltalk-76.

An implementation of Pascal appears on a CDC 6000-series computer. A general-purpose structured language named after the famous mathematician and philosopher Blaise Pascal. It was very popular during the '80s and '90s. Whilst popularity of Pascal itself has waned (its principal use is in teaching of programming) languages derived from it (such as Object Pascal) are still in use.

Icon, a descendant of SNOBOL4, appears.

  • 1972 - Dennis Ritchie produces C. A compiled procedural, imperative programming language made popular as the basis of Unix. The definitive reference manual for it will not appear until 1974.

The first implementation of Prolog—by Alain Colmerauer and Phillip Roussel—appears.

  • 1974 - Another ANSI specification for COBOL appears.
  • 1975 - Tiny BASIC by Bob Albrecht and Dennis Allison (implementation by Dick Whipple and John Arnold) runs on a microcomputer in 2 KB of RAM. A 4-KB machine is sizable, which left 2 KB available for the program.

Bill Gates and Paul Allen write a version of BASIC that they sell to MITS (Micro Instrumentation and Telemetry Systems) on a per-copy royalty basis. MITS is producing the Altair, an 8080-based microcomputer.

Scheme, a LISP dialect by G.L. Steele and G.J. Sussman, appears.

Pascal User Manual and Report , by Jensen and Wirth, is published. Still considered by many to be the definitive reference on Pascal.

B.W. Kerninghan describes RATFOR—RATional FORTRAN. It is a preprocessor that allows C-like control structures in FORTRAN. RATFOR is used in Kernighan and Plauger's "Software Tools," which appears in 1976.

  • 1976 - Design System Language, considered to be a forerunner of PostScript, appears.
  • 1977 - The ANSI standard for MUMPS—Massachusetts General Hospital Utility Multi-Programming System—appears. Used originally to handle medical records, MUMPS recognizes only a string data-type. Later renamed M.

The design competition that will produce Ada begins. Honeywell Bull's team, led by Jean Ichbiah, will win the competition.

Kim Harris and others set up FIG, the FORTH interest group. They develop FIG-FORTH, which they sell for around $20.

Sometime in the late 1970s, Kenneth Bowles produces UCSD Pascal, which makes Pascal available on PDP-11 and Z80-based computers.

Niklaus Wirth begins work on Modula, forerunner of Modula-2 and successor to Pascal.

  • 1978 - AWK—a text-processing language named after the designers, Aho, Weinberger, and Kernighan—appears.

The ANSI standard for FORTRAN 77 appears.

  • 1980 - Smalltalk-80 appears.

Modula-2 appears.

Franz LISP appears.

Bjarne Stroustrup develops a set of languages—collectively referred to as "C With Classes"—that serve as the breeding ground for C++.

  • 1981 - Effort begins on a common dialect of LISP, referred to as Common LISP.

Japan begins the Fifth Generation Computer System project. The primary language is Prolog.

  • 1982 - ISO Pascal appears.

PostScript appears.

  • 1983 - Smalltalk-80: The Language and Its Implementation by Goldberg et al is published.

Ada appears. Its name comes from Lady Augusta Ada Byron, Countess of Lovelace and daughter of the English poet Byron. She has been called the first computer programmer because of her work on Charles Babbage's analytical engine. In 1983, the Department of Defense directs that all new "mission-critical" applications be written in Ada.

In late 1983 and early 1984, Microsoft and Digital Research both release the first C compilers for microcomputers.

In July, the first implementation of C++ appears. The name is coined by Rick Mascitti.

In November, Borland's Turbo Pascal hits the scene.

  • 1984 - A reference manual for APL2 appears. APL2 is an extension of APL that permits nested arrays.
  • 1985 - Forth controls the submersible sled that locates the wreck of the Titanic.

Vanilla SNOBOL4 for microcomputers is released.

Methods, a line-oriented Smalltalk for PCs, is introduced.

  • 1986 - Smalltalk/V appears—the first widely available version of Smalltalk for microcomputers.

Object Pascal for the Mac is released. An object oriented derivative of Pascal. Developed by Apple Computer in the 1980s, today it is primarily known as the language of Borland Delphi. It is also used with Kylix, Chrome and various open source object Pascal implementations, such as FreePascal.

Borland releases Turbo Prolog.

Charles Duff releases Actor, an object-oriented language for developing Microsoft Windows applications.

Eiffel, another object-oriented language, appears.

C++, a compiled programming language based on C, with support for object-oriented programming. It is one of the most widely-used programming languages currently available. It is often considered to be the industry-standard language of game development, but is also very often used to write other types of computer software applications. C++ was developed by Bjarne Stroustrup and was based on the programming language C. C++ retains the syntax and many familiar functions of C, but also adds various concepts associated with other programming paradigms, such as classes.

  • 1987 - Turbo Pascal version 4.0 is released.

Perl one of the first widely-used, cross-platform, interpreted languages, Perl owes much of its syntax and semantics to C and the Unix shell.

  • 1988 - The specification for CLOS—Common LISP Object System—is published.

Niklaus Wirth finishes Oberon, his follow-up to Modula-2.

  • 1989 - The ANSI C specification is published.

C++ 2.0 arrives in the form of a draft reference manual. The 2.0 version adds features such as multiple inheritance and pointers to members.

  • 1990 - C++ 2.1, detailed in Annotated C++ Reference Manual by B. Stroustrup et al, is published. This adds templates and exception-handling features.

FORTRAN 90 includes such new elements as case statements and derived types.

Kenneth Iverson and Roger Hui present J at the APL90 conference.

  • 1992 - Dylan—named for Dylan Thomas—an object-oriented language resembling Scheme, is released by Apple.
  • 1993 - ANSI releases the X3J4.1 technical report—the first-draft proposal for object-oriented COBOL. The standard is expected to be finalized in 1997.
  • 1994 - Microsoft incorporates Visual Basic for Applications into Excel.

PHP is developed. A newer programming language with focus on web design. It has a C-like syntax.

  • 1995 - In February, ISO accepts the 1995 revision of the Ada language. Called Ada 95, it includes OOP features and support for real-time systems.

JAVA arrives. An object oriented interpreted programming language. It has gained popularity in the past few years for its ability to be run on many platforms, including Solaris, Linux, Microsoft Windows, Mac OS and other systems. It was developed by Sun Microsystems.

  • 1996 - Anticipated release of first ANSI C++ standard.
  • 2001 - C# is an object-oriented programming language developed by Microsoft as part of their .NET initiative. C# has a procedural, object oriented syntax based on C++ that includes aspects of several other programming languages (most notably Delphi,Visual Basic, and Java) with a particular emphasis on simplification (less symbolic requirements than C++, less decorative requirements than Java). Though developed by Microsoft, C# is standardized by the ECMA and International Standards Organization.
  • Shell scripting, in particular using either a variant of the Bourne shell or the C shell, is popular among UNIX hackers. Although the exact implementation varies among different shells, the core principles remain intact: only providing facilities for program flow (also seen in C) while placing emphasis on using external programs, although most shells feature some other functions internally, known as builtins. Shell scripting is used primarily in systems administration, especially where tasks need to be automated and run at specific times (backups, monitoring, file system maintenance, among others). It is also used as a tool for rapid prototyping when the exact design of a program is not yet clear enough for a full implementation, often in a compiled language like C. While most shell scripts are relatively simple it is possible to create complex and powerful programs in many implementations.

Software development

Main article: Software engineering

Software is a mass noun for computer programs and data. The accompanying documentation and software license are also considered an essential part of the software, even though they don't involve any actual coding.

Creating software involves:

  • Requirements analysis
  • Specification
  • Software architecture
  • Coding
  • Compilation
  • Software testing
  • Documentation
  • Integration
  • Maintenance

Notes

  1. Paul Graham (2003), "Hackers and Painters" Retrieved August 8, 2007.

External links

All links retrieved June 11, 2013.

Credits

New World Encyclopedia writers and editors rewrote and completed the Wikipedia article in accordance with New World Encyclopedia standards. This article abides by terms of the Creative Commons CC-by-sa 3.0 License (CC-by-sa), which may be used and disseminated with proper attribution. Credit is due under the terms of this license that can reference both the New World Encyclopedia contributors and the selfless volunteer contributors of the Wikimedia Foundation. To cite this article click here for a list of acceptable citing formats.The history of earlier contributions by wikipedians is accessible to researchers here:

Note: Some restrictions may apply to use of individual images which are separately licensed.

Research begins here...
Share/Bookmark