Re: Code comments extraction for documentation

Subject: Re: Code comments extraction for documentation
From: Sandy Nicholson <sandy -at- ambertext -dot- co -dot- uk>
To: techwr-l -at- lists -dot- techwr-l -dot- com
Date: Tue, 24 Oct 2006 23:15:25 +0100

John Harrington asked about extracting comments from code for use in documentation (presumably oriented towards programmers).

I don't know of a special term for this kind of comment extraction, but it is certainly a well established technique. The tools that are used typically depend on the programming language. Java programmers, for instance, will very often use the Javadoc tool to generate standardised HTML documentation from specially formatted comments in the code.

Sandy Harris commented:

The buzzphrase for this is "literate programming". Google search turns
up many references. No doubt there are some good ones.

Literate programming actually takes the idea much further. It is as much a software-engineering methodology as a documentation technique. The source files for a literate program are preprocessed to generate readable expository documentation on the one hand and compilable code on the other. To an extent it's more about assembling fragments of code gleaned from the documentation than it is to do with extracting documentation from comments in the code.

For an excellent exposition of this fascinating but (sadly) little- used technique, read Don Knuth's book, simply called Literate Programming. (Knuth's monumental TeX typesetting system was itself written as a literate program, and his exposition of the code in the book TeX: The Program was generated from the literate source.)

Best wishes,
Sandy

Ambertext, 2/Gf Bruntsfield Crescent, Edinburgh EH10 4EZ, Scotland
+44 (0) 131 447 9257 http://www.ambertext.co.uk/ sandy -at- ambertext -dot- co -dot- uk
Sole proprietor: Alexander J Nicholson
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

WebWorks ePublisher Pro for Word features support for every major Help format plus PDF, HTML and more. Flexible, precise, and efficient content delivery. Try it today! http://www.webworks.com/techwr-l

Easily create HTML or Microsoft Word content and convert to any popular Help file format or printed documentation. Learn more at http://www.DocToHelp.com/TechwrlList

---
You are currently subscribed to TECHWR-L as archive -at- infoinfocus -dot- com -dot-
To unsubscribe send a blank email to techwr-l-unsubscribe -at- lists -dot- techwr-l -dot- com
or visit http://lists.techwr-l.com/mailman/options/techwr-l/archive%40infoinfocus.com


To subscribe, send a blank email to techwr-l-join -at- lists -dot- techwr-l -dot- com

Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/techwhirl/ for more resources and info.


References:
Code comments extraction for documentation: From: John Harrington
Re: Code comments extraction for documentation: From: Sandy Harris

Previous by Author: Release notes and DITA
Next by Author: Re: Open vs Appear, Yet Again (was: "RE: WG: Newbie question - GUI terminology")
Previous by Thread: Re: Code comments extraction for documentation
Next by Thread: RE: Code comments extraction for documentation


What this post helpful? Share it with friends and colleagues:


Sponsored Ads