Re: code examples

Subject: Re: code examples
From: Sandy Harris <sandy -at- storm -dot- ca>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Tue, 19 Dec 2000 15:34:19 -0500

train2 -at- sprynet -dot- com wrote:
>
> when citing code examples within a document, even if they are there only for example,
> not instruction, should they be described and labeled every time???

A rule for code examples that I always use, I think originally from Kernighan and Pike
"The Unix Programming Environment" is:

All examples should be taken from working, tested, programs.

This avoids all sorts of problems with typos and thinkos in constructing examples.
If you supply the full programs, they also provide context for the examples and a
starting point for user modifications of the code.

I consider this essential, but it has been quite controversial on some assignments.

In one case I had a docs manager and a development manager neither of whom wanted
any of their staff "wasting" time writing example programs. I very nearly lost the
contract by flatly refusing to use untested examples, telling them I needed complete,
tested, example programs and all they had to decide was who would write them.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Develop HTML-based Help with Macromedia Dreamweaver! (STC Discount.)
**NEW DATE/LOCATION!** January 16-17, 2001, New York, NY.
http://www.weisner.com/training/dreamweaver_help.htm or 800-646-9989.

Take XML and Tech Writing courses online! Our instructor-led courses
(4-6 hrs/wk) give you "hands on" experience at your convenience. STC members
get 20% off! http://www.online-learning.com/index.html.
---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


Previous by Author: Re: Pulling it slightly OT: TW Salaries--Is it me, or are people greedier (Mild Vent)
Next by Author: Re: Turning down an offer you can't refuse
Previous by Thread: RE: code examples
Next by Thread: Re: code examples


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


Sponsored Ads