Path: utzoo!attcan!uunet!seismo!esosun!ucsdhub!hp-sdd!nick
From: nick@hp-sdd.HP.COM (Nick Flor)
Newsgroups: comp.software-eng
Subject: Re: Basics of Program Design
Message-ID: <1335@hp-sdd.HP.COM>
Date: 6 Jul 88 05:20:35 GMT
References: <900@td2cad.intel.com> <3537@pdn.UUCP> <1559@microsoft.UUCP> <1392@lznv.ATT.COM> <349@uwslh.UUCP>
Reply-To: nick@hp-sdd.UUCP (Nick Flor)
Distribution: na
Organization: Hewlett Packard, San Diego
Lines: 61

In article <349@uwslh.UUCP> lishka@uwslh.UUCP (Fish-Guts) writes:
>
>     At my *real* job I flow chart every now and then, but only for
>complex parts of large programs.  I would hate to flow chart a 10,000
>line C program in full!  (It isn't worth the effort to me to go that
>far).  However, I draw a hell of a lot of diagrams of just about
>anything that I need to clarify...it helps me, and it helps the people
>I am writing these programs for, because I have found that they rarely
>think in terms of "real" or "pseudo" code (most of them are not
>programmers).  Flow charting has its place; same as pseudo-coding and
>whatever else.  Some people still use it. 
>

Glad to see more discussion on design.  Let me put in my 2 cents 
worth about flow charts:

Flow charts show flow of control.  As such, they are more useful for
documenting detailed parts of a program, e.g a complex algorithm.
They are generally not useful in high level design, where you are trying
to figure out what functions and data must be created.  Again, dataflow
diagrams would be more useful during initial design.

Flow charts should primarily be used in the detailed design phase.

Speaking of which, for those of you who have not taken a software
engineering course, one of the most common software life cycle models
is the phased life cycle model.

Briefly, there are 5 phases

1) Requirements -- in this phase you specify what you want the software
   to do without regard to details about how it should be done.
2) Design -- general and detailed design of the software.
3) Implementation -- coding the design up.
4) Validation -- making sure the implementation conforms to the specifications
5) Maintenance -- bug fixes, enhancements.

Supposedly you can go from one phase to the next, much like a production line,
without going back, but in practice this isn't the case.

I guess dataflow diagrams can be used in phases 1&2.  Structure charts,
2D diagrams, etc. in phase 2.  Flow charts/pseudocode in the 
detailed design phase (phase 2.5).  Good editors in phase 3.  
Static and dynamic analyzers, i.e. debuggers etc., in phase 4.

>     Odd...I never write down code by hand.  I always edit a printout
>if I need to see more than a screenful at a time.  Different strokes....

Yes.  Why write it twice if you have a good editor?  It's infinitely easier
to type 'dd' to erase a line in VI, than to use a pencil eraser.


Arguments welcome,


Nick
-- 
+ Disclaimer: The above opinions are my own, not necessarily my employer's.   +
+ Oh, sure. Sure. I'm going. But I got  | Nick V. Flor           * * o * *    +
+ your number, see? And one of these    | Hewlett Packard SDD   * * /I\ * *   +
+ days, the joke's gonna be on you.     | ..hplabs!hp-sdd!nick  * * / \ * *   +