Re: Documenting Code/Why Is It So Ugly?

Subject: Re: Documenting Code/Why Is It So Ugly?
From: Ben Kovitz <apteryx -at- CHISP -dot- NET>
Date: Tue, 2 Mar 1999 12:18:52 -0700

Kathleen Melly wrote:

>When I import code into a Frame doc it is so ugly. Does anyone have any
>tips for making it more readable? Is there a filter for importing code into
>Frame/PC (I know there's one for Frame/UNIX)? Is there a standard font and
>tab settings that I should be using?

Usually code looks best in Courier, no larger than 10-point, with tabs
every three or four spaces. Set the tabs to match the way the programmer
set them. If not Courier, then some other monospace font.

The big problem with code in documents is that often the code is wider than
the margins, forcing it to word-wrap. Code should *never* word-wrap. If
that happens, you need to manually reformat it the way the programmers do.
This usually means indenting the wrapped line another level in, although
you should wrap comments differently. Best to ask the programmers for some
examples of how they deal with extremely wide lines.

Now that our displays let you easily edit lines of code wider than 80
characters, wide lines are a worse problem when importing, and some
programmers just don't *ever* wrap wide lines. Some let lines of code go
off to the right for hundreds or even more than a thousand characters! If
your programmer is the sort who does that, try asking a different
programmer for help with formatting.

--
Ben Kovitz <apteryx -at- chisp -dot- net>
Author, _Practical Software Requirements: A Manual of Content & Style_
http://www.amazon.com/exec/obidos/ASIN/1884777597
http://www.manning.com/Kovitz


From ??? -at- ??? Sun Jan 00 00:00:00 0000=



Previous by Author: Re: New How To Information: Programming Manuals and Requirements Definitions Docs
Next by Author: Re: synonym for "rollback"
Previous by Thread: Documenting Code/Why Is It So Ugly?
Next by Thread: Re: Documenting Code/Why Is It So Ugly?


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

Sponsored Ads


Sponsored Ads