CSE 1402 Technical Documentation
for Software Engineers

Carlo Kopp, BE(Hons), MSc, PhD, PEng,
Monash University, Clayton, Australia
email: carlo@csse.monash.edu.au
Computer Science & Software Engineering
http://www.csse.monash.edu.au/
© 2002, Monash University, Australia

July 13, 2002

  

Lecture Notes (Writing Technique)
  

1 Revision Information

This document is currently at revision level:
 $Id: CSE-1402-W-2001.tex,v 1.1 2001/07/09 22:00:41 carlo Exp carlo $

2

            

Introduction

3

3.1 Proverb:

Only two things are certain in life: death and taxes.

3.2 Observations:

  1. Death certificates are a form of documentation.
  2. Tax records are a form of documentation.
  3. The earliest forms of documentation kept by all known civilisations were - taxation records.

3.3 Conclusion:

Documentation is an unavoidable fact of life, whether you like it or hate it, you will have to deal with it.

4 Unit Objectives (Writing Technique):

5 Unit Objectives ...

6 Unit Objectives (Tools):

7 Unit Objectives ...

8 Why is Documentation Important?

9 Problem Issues in Documentation

10 Problem Issues in Documentation

11 Documentation vs Software

12 Electronic vs Hardcopy Documentation

13 Evolution of Documentation Media

  1. Clay paintings on stone - 30,000 B.C.
  2. Stone reliefs - possibly 6,000 B.C.
  3. Clay tablets - Sumeria 3,000 B.C.
  4. Ink on papyrus and parchment - Egyptian, Greek, Roman civilisations.
  5. Ink on parchments and paper - Medieval Europe.
  6. Gutenberg’s “printing press” - Renaissance Europe.
  7. Electronic typesetting - late 1970s.
  8. Electronic publishing - late 1980s.
  9. World Wide Web - 1993.

14 Weaknesses of Hardcopy Documentation

15 Evolution of Electronic Media

  1. Punch cards or magnetic tape for archival storage - 1950s.
  2. Plain text on dot matrix or band printers - 1960s.
  3. Word processors and markup languages - 1960s and 1970s.
  4. WYSIWYG and laser printer - Xerox PARC 1970s.
  5. Electronic typesetting (LaTeX) - 1970s.
  6. Hypertext - 1980s.
  7. Desktop computers with GUIs - 1980s.
  8. World Wide Web - 1993.

16

            

The English Language

17 Using English

18 Texts

19 The Origins of English

20 Saxon, Frisian, Norse and Latin

21 French

22 American English

23 Basics of English Style

24 Basics of English Style

25 Examples:

  1. “Should you require further assistance” against “If you need more help”.
  2. “Prior to and following” against “Before and after”.
  3. “Upon accessing the menu” against “When you access the menu”.

26 Basics of English Style

27 Basics of English Style

28 Ambiguity

29

            

English Grammar

30 Why Grammar?

31 Grammar Guide

32 The Definite Article - the

33 The Definite Article - the

34 The Indefinite Article - a, an, some

35 Nouns

36 Exceptions to Countable Nouns (1)

37 Exceptions to Countable Nouns (2)

38 Personal Pronouns

39 Reflexive, Demonstrative and Possessive Pronouns

40 Adjectives and Comparisons

41 Full Verbs

42 Regular and Irregular Verbs

43 Primary and Modal Auxiliary Verbs

44 Adverbs and Comparisons

45 Prepositions of Time and Space

46 Tenses

47 Simple Present Tense

48 Present Continuous Tense

49 Present Perfect Tense

50 Present Perfect Continuous Tense

51 Future Tense

52 Simple Past Tense

53 Past Continuous Tense

54 Syntactic Parsing

Parsing is a systematic technique for the analysis of a sentence.

PIC

55

            

Software Life Cycles
&
Documentation

56 Software Life Cycles and Documentation

57 SLC and Documentation ...

58 SLC and Documentation ...

59 Presentation Media

60 Types of Software Documentation

There are several basic types of document which are associated with each phase of the SLC:

61 Types of Software Documentation ...

This subject will review each of these categories of documentation and discuss them in appropriate detail. Even if you will not be producing documents in a specific category, as programmers you may be required to contribute to their production, review them, modify them or assess them. Therefore you must understand their attributes, how to produce them and what problem issues may arise.

62

            

Basic Document Writing Technique

63 Reading

64 Document Planning

65 Document Aims

66 Document Aims ...

67 Analysing the Audience

68 Audience Checklist

69 Audience Checklist ...

 Some research may be required to fill out such a checklist, and it pays to look at the approach used by other writers. The best strategy is always that of interviewing some typical readers.

Beware of using too small a number of samples! Quizzing one or two readers may not give you an accurate picture of what a typical reader will be like.

You should also be cautious about using your peers as examples of typical readers, since they will mostly likely share your preferences.

70

            

Planning &
Document Structure

71 Document Structure vs Planning

72 Typical Document Structures

What components must be included in every document?  

  1. The name(s) of the author(s) and particulars.
  2. The title of the document.
  3. The name(s) of the publisher(s) and particulars.
  4. Revision description and date.
  5. ‘Sign Off’ table or list.
  6. Table of contents if the document is large.
  7. An introduction, abstract or other brief description of what the document is for.
  8. One or more chapters or sections with content.
  9. Appendices, glossaries, references, and indices in larger documents.

73 Author Name and Particulars

  1. The author’s name should be complete, and preferably include middle initials. Abbreviating the first and middle name is usually acceptable.
  2. Names and initials are always capitalised.
  3. It is a common practice to include the author’s academic titles and job title.
  4. Titles usually start with the lowest degree and end with the highest. Job titles usually come after academic titles, and may include the organisation name.
  5. It is customary to include an email address with a name and titles.
  6. In some documents, professional association membership is included.

74 Example Author Name and Particulars


Jane M. Doe, BSE(hons), MComp, MACM, MIEEE

SoftStuff Systems
janedoe@somewhere.null.org

75 Document Titles

  1. Titles should be short, exact and complete. Long titles are cumbersome, ambiguous and incomplete titles are confusing.
  2. A title may span several lines.
  3. A common practice is to use a main title, and one or more subtitles in a more complex document.
  4. The main title should include the name of the product discussed by the document.
  5. Subtitles frequently explain the the main title, or describe the content or nature of the document.
  6. Often the revision level or edition of a document is included in the title.

76 Document Title Examples


TROPPO Propagation Simulator: User Manual

TROPPO Propagation Simulator
User Manual
Technical Manual
Library Interface Manual

TROPPO Propagation Simulator
Technical Documentation, Third Edition.

77 Publisher

  1. The information identifying the publisher should always be sufficiently complete to allow a reader to locate the publisher with no difficulty.
  2. It is customary to include a complete or partial address, the latter where the publishing organisation is easy to find.
  3. The name of the publisher should always be on the title page, address details may or may not be on the title page. Example: books frequently list only the name of the publishing house on the cover, and put the exact address on a dedicated second page.
  4. It is a good practice to include copyright information, where applicable. Example: © 2000, Jane Doe, SoftStuff Systems.
  5. Contemporary publications will often include the publisher’s URL.

78 Publisher Information Examples


CSSE, Monash University, Clayton

Computer Science & Software Engineering
Monash University
Clayton, 3800
Australia

Computer Science & Software Engineering
Clayton Campus.
© 2000, Monash University, Australia.

79 Date and Revision

  1. Date and revision information is essential. A technical document without this information should always be considered “suspect”.
  2. The simplest form of revision information and dating is a simple listing on the title page. Example: Rev 1.6.3 , 15th August, 2000.
  3. It is a good practice with more complex technical documents to include either a revision page or pages, or an appendix or annex containing all prior revision information.
  4. Proper use of the RCS system and the $Log: $ command can save a lot of time when producing documents using electronic media.
  5. If the revision numbering of the document differs from that of the software, always ensure that a “mapping” list exists.

80 ‘Sign Off’ Tables or Lists

  1. A ‘Sign Off’ table or list is a commonly used feature in most technical documents.
  2. Its purpose is to show that all people participating in the production of the document have endorsed it as being complete and of satisfactory quality.
  3. A minimal implementation will include the name of the author and the author’s supervisor.
  4. More elaborate arrangements will have a list or table for each and every revision of the document.
  5. Many Quality Assurance systems mandate the use of such lists or tables in every technical document.

81 ‘Sign Off’ Table Example






Name Title Signature Date




Jane Doe Programmer 20/08/2000




Fred Smith Programmer 20/08/2000




Rebecca Savage Project Leader 20/08/2000




Harry Fumble QA Manager 28/08/2000





Table 1: Document Approval Status.

82 Tables of Contents

  1. Large documents such as manuals, specifications, standards or reports require a table of contents (ToC).
  2. Most good DTP, WP and typesetting packages can generate the ToC automatically, providing that we use the template properly.
  3. The ToC should list at least all the chapters, appendices and other components of the document, it should number them and list the page on which they are located.
  4. A more elaborate ToC arrangement will break down the sections in chapters and indent these by level.

83 Introductions, Summaries and Abstracts

  1. The purpose of an abstract, summary or introduction is to familiarise the reader with the contents of the document.
  2. Abstracts are usually found with simple documents such as papers or short reports.
  3. More detailed introductions or summaries are customary with larger and more complex documents, such as reports, manuals or books.
  4. Usually an abstract or summary should occupy no more than 400-500 words, or a typical page. An introduction may span several pages.
  5. Such introductory descriptions should assume the reader has little or no familiarity with the contents of the document.
  6. The aims and audience, if not implicit, should be identified.

84 The Body of the Document

  1. The body of a document contains the detailed information which we wish the reader to absorb.
  2. The structure of the body of a document varies with type. Large documents contain multiple ‘chapters’ or ‘sections’, small documents may only contain one or more ‘sections’.
  3. Many types of documents follow conventions for the structure of the body of the document. This is especially true of specifications and manuals for software.
  4. If a structure other than that which a reader expects to see, by convention, is adopted, we should explain this to the reader.

85 Appendices and Glossaries

  1. Appendices are similar in format to chapters, but they contain supporting material. The inclusion of this material would clutter the body of a document.
  2. Appendices typically contain tabular data, lists, plots, charts, drawings, flowcharts, smaller specifications, interface definitions and other bulky items which are difficult to incorporate in the body of a document.
  3. A glossary is special type of appendix, which explains the technical terms used in a document.

86 References, Bibliographies and Indices

  1. References or bibliographies list all of the other documents used in the production of the document.
  2. Each entry in a reference list or bibliography must contain enough information to find the document which is being referred to.
  3. The index lists important words or keywords in the document, with reference information such as page numbers.

87 Skeletons and Templates

  1. The most efficient strategy for designing a document is to first produce a ‘skeleton document’, which lists the various parts of the document and includes notes on the intended content of each part.
  2. Once the skeleton exists, it is easy to ‘flesh it out’ with content.
  3. For many standard document types, DTP or typesetting packages will provide standard ‘templates’ which contain the required structure of the document and set the proper layout.
  4. By editing a template appropriately, we can quickly produce a skeleton for a document.
  5. Frequently a template may not fit the structure required for a particular type of document and must be edited as required.

88

            

Product Proposals

89 What is a Product Proposal?

90 What is in a Product Proposal?

91 What is in a Product Proposal?

92 Audience & Language

93 Audience & Language ...

94 Product Proposal Structures

95 Product Proposal Structures ...

96

            

Software Product Specifications

97 What is a Software Product Specification?

98 What is a Software Product Specification?

99 What is in a Software Product Specification?

100 What is in a Software Product Specification?

101 Audience & Language

102 Audience & Language ...

103 Specification Structures

104 Specification Structures ...

105

            

Software Test Specifications

106 What is a Software Test Specification?

107

            

Commenting Source Code

108 References:

Conway D. et al, “theStyle, A Guide to Writing Better C Programs”, Department of Computer Science, Monash University, 1994.

109 What are Comments Used For?

110 Issues in Commenting Code

111 Style Variations

112 ‘Minimalist’ Commenting

Several comments are essential in every source file:

These are always placed at the top of a file, as a ‘file header’.

113 ‘Minimalist’ Commenting Example:

 /*
  * flunk.c - int flunk(char *filename);
  * Jane Doe
  * (c) 2000, Softstuff Systems, Santa Clara, California
  * Created: 28/08/2000
  * Function: sorts a file by grades
  */
 
 int flunk(char *filename)
 {

 Blah ....
 }

114 Why ‘Comprehensive’ Commenting?

115 The File Header

116 File Header Example:

 /* flunk.c - Test Failure List Sorter
  * Jane Doe, Systems Architect, Product Development.
  * (c) 2000, Softstuff Systems, Santa Clara, California
  * Created: 28/08/2000 from sortlist.c
  * $Id: flunk.c,v 1.2 2000/08/28 21:47:42 jdoe Exp jdoe $
  * $Log: flunk.c,v $
  * Revision 1.2  2000/08/28 21:47:42  jdoe
  * modified to include comments.
  * Function: flunk() is called by another program with
  * the name of a test list failure file in `test-2'
  * format.It sorts the test failures and writes them
  * to a buffer pointed to global variable char *buf.

117

  * It returns 1 if OK * and 0 if it fails.
  * Usage: int flunk(char *filename);
  */

118 Block vs Inline Format

119 Block Format Examples in ‘C’:

 /*
  * This is ordinary C block format and the easiest
  * style of comment block format to use.
  */
 /***************************************************
  * This is a comment produced in block format,
  * with additional lines of `*' characters used to
  * emphasise the beginning and end of the block
  **************************************************/
 /* This is a comment produced without
 any blocking, observe how messy this looks! */

120 Block Format in Other Languages:

 // ***********************************************
 // This is block format in C++
 // ***********************************************
 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
 C This is block format in FORTRAN
 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
 \ ************************************************
 \ This is block format in Forth
 \ ************************************************

 ##################################################
 # This is block format in Bourne shell
 ##################################################

121 Inline Format Examples:

 /* This is inline format in C */
 
 // This is inline format in C++
 
 C This is inline format in FORTRAN
 
 \ This is inline format in Forth
 
 # This is inline format in Bourne shell

122 ‘Strategic’ vs ‘Tactical’ Commenting

123 Example:

     /*
      * At this point we can generate contents for
      * the arrays, first we do the loss/freq table
      * then we do the height profile etc
      */
     fprintf(stdout,"Generate Loss vs Altitude Table\n");
     for( i = 0; i < 2000; i ++){/*step thru altitude*/
         fprintf(stdout,"H0 = %d\n", i);
         startalt = i*0.01;  /* 10 metre increments */
         /* step through freq in 1 GHz steps */
         for( j = 1; j < 100; j++ ){
             td->flags = OXYGEN|WATER;
             td->f = j;   /* increment frequency */

124 Example ... :

             td->h = startalt;
             tropo_point(td);
             freq_table[i][j] = td->Gamma_gas;
         }
     }

125 Commenting Technique

126 Commenting Technique ...

127 Examples:

 /* Aligning comments in your code     */
 int   failures;  /* failed students   */
 int   passes;    /* passed students   */
 int   enrolled;  /* enrolled students */
 /* Cryptic and hard to follow comments*/
 /* Cryptic & hd 2 flw cmnts           */
 /* IMPORTANT: upper case is useful!  */
 /* Updating when modifying code - CK 28/08/2000 */
 while( f <= outerStop ){
     while( g <= innerStop ){
          f++; g++;
      } /* end inner loop */
 } /* end outer loop */

128

            

User Manuals

129 What is a User Manual?

130 Observation:

User manuals of poor quality can damage or destroy the commercial viability of a software product, and must always be of the highest quality. One of the fastest ways to damage a new product being released into the market is the provision of poor quality user manuals. Effort expended on user manuals is therefore always justified.

131 What is in a User Manual?

132 User Manual Media

133 User Manual Media ...

134 Audience & Language

135 Audience & Language ...

136 User Manual Structures

137 User Manual Structures ...

138 Illustrations and Artwork

139 Example #1:

pict

PDFslide viewing window displayed by Acroread.

140 Example #2:

pictpict

Xfig open and export windows.

141 Manuals for Novice Users

142 Manuals for Advanced Users

143

            

Using Graphics

144 References:

Woolever K.R., “Writing for the Technical Professions”, Longman, 1998, Chapter 5.

Kopp C., “An I/O and Stream Inter-Process Communications Library for a Password Capability System”, MSc Thesis, Monash University, 1996 (Misc. Artwork).

145 Why Should Graphics Be Used?

146 Types of Graphics

147 Example - Conceptual Diagram

PIC

148 Conceptual Diagrams

149 Example - Memory Map & Concept

PIC

150 Memory Maps

151 Example - Flow Chart

PIC

152 Flow Charts

153 Example - Datastructure Diagram

PIC

154 Datastructure Diagrams

155 Example - Functional Diagram

PIC

156 Functional Diagrams

157 Example - Plot (GNUPlot)

PIC

158 Plots

159 Example - Screen Dumps

pict

160 Screen Dumps

161 Placement of Graphics

162 Placement of Graphics ...

  1. Graphics should be placed in the document before they are discussed in the text.
  2. Graphics should be placed as near as possible to the text which refers to them.
  3. Graphics should always be labelled with a number, and it is a good practice to use a caption.
  4. Captions should be brief and focussed on the content of the graphic.
  5. Text in graphics should be horizontal where possible, especially in electronic documents.
  6. The quality of the graphics can quickly impress a reader, poor quality graphics can convey the impression of a poor quality document.

163 Placement of Graphics ...

  1. The size of graphics and the level of detail should be matched to the document carefully. Small graphics are hard to read, too much detail can make the graphic incomprehensible.
  2. Colour should be used carefully, especially in electronic documents.
  3. Bright colours can be annoying, poorly contrasting colours can make a document difficult to read.
  4. Excessive use of graphics can clutter a document, and can also result in performance problems when viewing an electronic document, e.g. a web page.

164

            

Technical Manuals

165 What is a Technical Manual?

166 Observation:

Technical manuals of poor or marginal quality can introduce large costs in the maintenance of a software product. Like comments in source code, technical manuals must accurately reflect the inner workings of a software product.

167 What is in a Technical Manual?

168 Technical Manual Media

169 Technical Manual Media

170 Audience & Language

171 Technical Manual Structures

172 Technical Manual Structures ...

173 Illustrations and Artwork

174

            

Journal Articles & Papers

175 Journal Articles & Papers

176 Article Media

177 Audience & Language

178 Article Structures

179

            

White Papers

180 The Aims of a White Paper

181 Producing White Papers

182

            

Marketing & Sales Literature

183 References:

DeLamarter R.T., “Big Blue”, Macmillan, 1986

184 Marketing and Sales Literature

185 Ethics in Marketing and Sales

186 Ethics in Marketing and Sales ...

187 Ethics in Marketing and Sales ...

188 Types of Marketing/Sales Documents

189 Technical Brochures and Guides

190 Technical Brochures and Guides ...

191 Non-technical Brochures and Guides

192 Non-technical Brochures and Guides ...

193 Advertisements and Posters

194 Competitive Analyses

195

            

Literate Programming

196 References:

Literate Programming Website,
http://www.literateprogramming.com

Literate Programming FAQ,
http://shelob.ce.ttu.edu/daves/lpfaq/faq.html

Norman Ramsey’s noweb page,
http://www.cs.virginia.edu/ nr/noweb

197 The Conventional Software Engineering Model

198 The Conventional Software Engineering Model ...

199 Weaknesses in the Conventional Model

200 Weaknesses in the Conventional Model ...

201 Other Problem Issues

202 Are There Remedies?

203 What is Literate Programming?

204 Machine vs Human Readable Files

205 Using a LP Toolset

206 Writing Literate Programs

207 Problem Issues in LP

208

            

End CSE-1402 Writing Stream Lectures