[comp.software-eng] Sticky Note Comments

dtayl@cup.portal.com (david lee taylor) (12/30/90)

John Rosen writes:
> Food for thought:  The "sticky note" concept (those little yellow
> things from 3M) is a superb documentation concept and has already
> made its way into the computer arena in the form of add-in products
> for things like 1-2-3, Excel, Microsoft Word, etc.  In these add-ins,
> the user can "open up" a "sticky note" anywhere in a file and 
> type in comments about the spreadsheet cell, paragraph, chart, etc.
> This seems like a wonderful concept to extend to programs... The
> "sticky notes" are kept hidden but can reappear at the click of
> a function key or mouse button... 
 
On the other hand, some of us would like to see the comments but not
the code! Tho it's true that comments often are misleading or plain
incorrect, they are still the most common means of quickly getting
to know a piece of code. 
Structure editors for program code, like ISE's Cepage (check out 
comp.lang.eiffel), allow one to view code as a hierachy of program
constructs. Levels of the hierarchy can be shown or hidden.
By preceeding each level with a comment, you get a commentary at the 
desired level of detail.
The poor man's approach to this method is an outliner:

1. /* This comment gives a general description of funct1 */
1.1 funct1 ()
1.1.1 /* This comment describes the loop below */
1.1.1.1 while ( not done )
2. /* This comment gives a general description of funct2 */
2.1 funct2 ()
.
.

So that hiding below the first level shows:

1. /* This comment gives a general description of funct1 */
2. /* This comment gives a general description of funct2 */

And hiding below the third level shows:

1. /* This comment gives a general description of funct1 */
1.1 funct1 ()
1.1.1 /* This comment describes the loop below */
2. /* This comment gives a general description of funct2 */
2.1 funct2 ()


So that any level of implementation details can be hidden from view.
Now if your outliner can hide headlines, the comments can be hidden
and only code shown.
However, most programmers have a preferred editor that is tightly 
integrated into their environment and most outliners do not fit
in that environment. 

Anyone have experiences with using outliners for coding?

David Taylor
dtayl@cup.portal.com
dtayl@swdc.stratus.com