ArticleslgStudy

biology

Web (programming system)

Web (programming system) is a biology topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Web (programming system) rather than just read about it. In short: Web, traditionally styled WEB, is a computer programming system created by Donald Knuth as the first implementation of what he called "literate programming": his idea that one could create software as works of literature, by embedding source code in descriptive text, rather than the reverse. Unlike standard programming practice which relegates documentation to comments, the WEB approach is to write an article to doc…

Key takeaways

  • Web (programming system) belongs to biology; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Web (programming system) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Web (programming system) from memory before moving on to harder problems.

Reference excerpt

Web, traditionally styled WEB, is a computer programming system created by Donald Knuth as the first implementation of what he called "literate programming": his idea that one could create software as works of literature, by embedding source code in descriptive text, rather than the reverse. Unlike standard programming practice which relegates documentation to comments, the WEB approach is to write an article to document the making of the source code, and to include all the source code in that article, so as to be compilable therefrom.

Philosophy The common practice in most programming languages is that the primary text is source code, optionally supplemented by descriptive text in the form of comments. Knuth proposed that making the descriptive text primary was putting things in an order more convenient for human readers, rather than the order demanded by compilers. Much like TeX articles, the Web source text is divided into sections according to documentation flow. For example, in CWEB, code sections are seamlessly intermixed in the line of argumentation.

Implementations The original WEB system depends on Pascal and comprises two programs:

TANGLE, which produces compilable Pascal code from the source texts, and WEAVE, which through the use of TeX produces nicely-formatted, printable documentation from the same source texts. Others:

CWEB (below) is a version of Web for the C programming language, while noweb is a separate literate programming tool, which is inspired by Web (as reflected in the name) and which is language agnostic. The most significant programs written in Web are TeX and Metafont. Modern TeX distributions however use another program called Web2C to convert Web source to C.

CWEB

CWEB is a computer programming system created by Donald Knuth and Silvio Levy as a follow-up to Knuth's WEB literate programming system, using the C programming language (and to a lesser extent the C++ and Java programming languages) instead of Pascal. Like WEB, it consists of two primary programs:

CTANGLE, which produces compilable C code from the source texts, and CWEAVE, which produces nicely-formatted printable documentation using TeX.

Features Can enter manual TeX code as well as automatic. Makes formatting of C code suitable for pretty-printing. Can define sections, and can contain documentation and codes, which can then be included into other sections. Writes the header code and main C code in one file, and can reuse the same sections, and then it can be tangled into multiple files for compiling. Uses #line directive so that any warnings or errors refer to the .w source. Include files. Change files, which can be automatically merged into the code when compiling/printing. Produces index of identifiers and section names in the printout.

See also Documentation generators – While comparable with Web's WEAVE, these however generally follow the standard practice of source code first, the opposite of the Web approach.

References

External links The TeX Catalogue entry for Web CWEB homepage Examples of programs written in Web, By Donald Knuth (1981 and onward)

Worked examples

Example 1 — a first encounter with Web (programming system)

Start with the simplest possible case. Write down what Web (programming system) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In biology, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Web (programming system) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Web (programming system) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Web (programming system)

In research
Web (programming system) appears in biology research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Web (programming system) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Web (programming system) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free documentation generators, Literate programming, TeX, so understanding it makes those chapters shorter.
In everyday life
Look for Web (programming system) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Web (programming system)” →

How to study Web (programming system) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Web (programming system) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Web (programming system) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Web (programming system) in simple terms?

Web, traditionally styled WEB, is a computer programming system created by Donald Knuth as the first implementation of what he called "literate programming": his idea that one could create software as works of literature, by embedding source code in descriptive text, rather than the reverse. Unlike…

Why does Web (programming system) matter?

Because it connects several biology ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Web (programming system)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Web (programming system).

Tags

  • Free documentation generators
  • Literate programming
  • TeX

Keep exploring