FACTOID # 6: Clipperton Island wins our prize for the most unusual looking country.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Literate programming

Literate programming is a philosophy of computer programming based on the premise that a computer program should be written similar to literature, with human readability as a primary goal. According to this philosophy, programmers should aim for a “literate” style in their programming just as writers aim for an intelligible and articulate style in their writing. This philosophy contrasts with the mainstream view that the programmer’s primary or sole objective is to create source code and that documentation should only be a secondary objective. Programming redirects here. ... A computer program is a collection of instructions that describe a task, or set of tasks, to be carried out by a computer. ... For other uses, see Literature (disambiguation). ...


In practice, literate programming is achieved by combining human-readable documentation and machine-readable source code into a single source file, in order to maintain close correspondence between documentation and source code. The order and structure of this source file are specifically designed to aid human comprehension: code and documentation together are organized in logical and/or hierarchical order (typically according to a scheme that accommodates detailed explanations and commentary as necessary). At the same time, the structure and format of the source files accommodate external utilities that generate program documentation and/or extract the machine-readable code from the same source file(s) (e. g., for subsequent processing by compilers or interpreters). Software documentation or source code documentation is written text that accompanies computer software. ... Source code (commonly just source or code) is any series of statements written in some human-readable computer programming language. ... Source code (commonly just source or code) is any series of statements written in some human-readable computer programming language. ...

Contents

History and current implementations

The first published literate programming environment was WEB, introduced by Donald Knuth in 1981 for his TeX typesetting system; it uses Pascal as its underlying programming language and TeX for typesetting of the documentation. Look up web in Wiktionary, the free dictionary. ... Donald Ervin Knuth ( or Ka-NOOTH[1], Chinese: [2]) (b. ... AUGUST 25 1981 US Marine Sean Vance is Born on the 25th of August {ear nav|1981}} Year 1981 (MCMLXXXI) was a common year starting on Thursday (link displays the 1981 Gregorian calendar). ... TeX (IPA: as in Greek, often in English; written with a lowercase e in imitation of the logo) is a typesetting system created by Donald Knuth. ... Pascal is an imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ...


The complete commented TeX source code was published in Knuth's TeX: The program, volume B of his 5-volume Computers and Typesetting. Knuth had internally used a literate programming system called DOC as early as 1979; he was inspired by the ideas of Pierre Arnoul de Marneffe. The free CWEB, written by Knuth and Silvio Levy, is WEB adapted for C and C++, runs on most operating systems and can produce TeX and PDF documentation. Other implementations of the concept are noweb and FunnelWeb. Computers and Typesetting is a 5-volume set of books by Donald Knuth describing the TeX and Metafont systems for Digital typography. ... Also: 1979 by Smashing Pumpkins. ... Pierre - Arnoul de Marneffe Pierre - Arnoul de Marneffe is a Computer scientist (aka Top Gun because hes always wearing sunglasses because of the light of the overhead-projectors in the amphitheaters where he teaches Algorithmic) currently working at Liège university, Belgium. ... CWEB is a computer programming system created by Donald Knuth and Silvio Levy as a followup to Knuths WEB literate programming system, using the C programming language instead of Pascal. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... C++ (pronounced ) is a general-purpose programming language. ... “PDF” redirects here. ... noweb is a free literate programming tool, created in 1989-1999 by Norman Ramsey [1], and designed to be simple, easily extensible and language independent. ...


Related concepts

Outlining

Outlining editors are sometimes seen as providing a variant of the original concept of literate programming as used by Knuth. In particular, Leo combines outlining with interfaces to noweb and CWEB processors. Leo (Literate Editor with Outlines) is a text editor that features outlines with clones as its central tool of organization and navigation. ... noweb is a free literate programming tool, created in 1989-1999 by Norman Ramsey [1], and designed to be simple, easily extensible and language independent. ... CWEB is a computer programming system created by Donald Knuth and Silvio Levy as a followup to Knuths WEB literate programming system, using the C programming language instead of Pascal. ...


Embedded documentation

There are also less powerful systems to integrate documentation and code than literate programming; examples are pod for perl, doc++ for C, C++ and Java, javadoc for Java, and Doxygen for many languages. See documentation generator. Plain Old Documentation, commonly abbreviated as POD, is a simple platform-independent documentation tool for the computer language Perl. ... Wikibooks has a book on the topic of Perl Programming Perl is a dynamic programming language created by Larry Wall and first released in 1987. ... Javadoc is a computer software tool from Sun Microsystems for generating API documentation into HTML format from Java source code. ... Java language redirects here. ... Doxygen is a documentation generator for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors) and to some extent PHP, C#, D and ActionScript. ... Documentation generator is a programming tool that generates an API Documentation documentation from a set of specially commented source codes, and in some cases, binary files. ...


These however do not quite follow the literate programming philosophy since they typically just produce documentation about the program, such as specifications of functions and parameters, and not documentation of the program source code itself. They also do not allow rearrangement of presentation order, which is critical to the effectiveness of literate programming.


Haskell is a modern language that makes use of a limited form of literate programming: this semi-literate style does not allow code re-ordering or multiple expansion of definitions but lets the programmer intersperse documentation and code freely. Haskell is a standardized purely functional programming language with non-strict semantics, named after the logician Haskell Curry. ...


It is the fact that documentation can be written freely whereas code must be marked in a special way (see the example below) that makes the difference between semi-literate programming and excessive documenting, where the documentation is embedded into the code as comments.


Doctests

Similarly to source code, testing code that exercises an API can be embedded within human-readable documentation, along with the expected output of the calls. A test runner extracts and executes the code and verifies its output against the expected output. This idea originated from the Python programming language. An implementation is provided by the Python standard library's doctest module. Python is a general-purpose, high-level programming language. ... doctest is a module included in the Python programming languages standard library that allows the easy generation of tests based on output from the standard Python interpreter shell, cut and pasted into docstrings. ...


See also

In computer programming, intentional programming is a collection of concepts which enable software source code to reflect the precise information, called intention, which programmers had in mind when conceiving their work. ...

References

  • Eitan M. Guari, TeX & LaTeX Drawing and Literate Programming. McGraw Hill 1994. ISBN 0-07-911616-7 (includes software).
  • Donald E. Knuth, Literate Programming, Stanford, California: Center for the Study of Language and Information, 1992, CSLI Lecture Notes, no. 27.
  • Pierre Arnoul de Marneffe, Holon Programming. Univ. de Liege, Service d'Informatique (December, 1973).

Donald Knuth Donald Ervin Knuth (born January 10, 1938) is a renowned computer scientist and Professor Emeritus at Stanford University. ... Pierre - Arnoul de Marneffe Pierre - Arnoul de Marneffe is a Computer scientist (aka Top Gun because hes always wearing sunglasses because of the light of the overhead-projectors in the amphitheaters where he teaches Algorithmic) currently working at Liège university, Belgium. ...

External links

noweb is a free literate programming tool, created in 1989-1999 by Norman Ramsey [1], and designed to be simple, easily extensible and language independent. ...

  Results from FactBites:
 
Literate programming - Wikipedia, the free encyclopedia (938 words)
Literate programming is the writing of computer programs primarily for human beings to read, similar to a work of literature; hence the name "literate programming." This contrasts with the traditional view that a programmer's primary creation is source code to be read by a computer.
The first published literate programming environment was WEB, introduced by Donald Knuth in 1981 for his TeX typesetting system; it uses Pascal as its underlying programming language and TeX for typesetting of the documentation.
Knuth had internally used a literate programming system called DOC as early as 1979; he was inspired by the ideas of Pierre Arnoul de Marneffe.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.