Path: utzoo!attcan!uunet!husc6!uwvax!uwslh!lishka
From: lishka@uwslh.UUCP (Fish-Guts)
Newsgroups: comp.software-eng
Subject: Re: Basics of Program Design
Message-ID: <349@uwslh.UUCP>
Date: 5 Jul 88 19:54:32 GMT
References: <900@td2cad.intel.com> <3537@pdn.UUCP> <1559@microsoft.UUCP> <1392@lznv.ATT.COM>
Reply-To: lishka@uwslh.UUCP (Fish-Guts)
Distribution: na
Organization: U of Wisconsin-Madison, State Hygiene Lab
Lines: 78

In article <1392@lznv.ATT.COM> psc@lznv.ATT.COM (Paul S. R. Chisholm) writes:
>< "Would you buy a used operating system from these guys?" >
>
>In article <1559@microsoft.UUCP>, alonzo@microsoft.UUCP (Alonzo Gariepy) writes:
>>In article <900@td2cad.intel.com> brister@td3cad.UUCP (James Brister) writes:
>> What I mean is: do experienced programmers usually write flow charts,
>> or pseudo code.
>
>An anecdote from CS 701 (any other UW-Madcity alumni remember the
>graduate compiler course?)  
				    ^^^^^^^^^^
     Hey, nice to see a familiar school mentioned!  I hope to be
taking the course in the fall semester.

>No, I don't think anyone writes flow charts any more.

     It depends what you mean by flow-charts.  A point that I haven't
seen mentioned yet is that different programmers see programs in
different ways.  A partner and I were working on a natural-language
parser/generator, and I found that one of the biggest differences
between us was: she thought of code in terms of written text (i.e.
pseudo-code, real-code, whatever), whereas I can only think of
programs by "visualizing" them (by writing out flowcharts, pictures of
data-structures, whatever).  I found that she couldn't think in
pictures, and her textual forms of representation were just so many
words to me.  After we figured that out, it was a lot easier working
with one another, and we created a good set of programs together.

     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. 

>Me, too.  I can't get a design right the first time.  It takes me two
>or three attempts.  I need those scribbled-on pieces of paper, with
>goofs lightly crossed out, as places to make mistakes that I can throw
>out!  Writing with an editor just isn't the same.  Material that I
>wrote and changed is gone forever.  Worse, it's harder to throw out a
>compilable bad effort.  And the temptation to sweat details too early
>is enormous when the compiler is right *there*. . . .

     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....

     Although I can't think of any foolproof design method, I have a
suggestion (for the original poster): use good tools.  I use programs
like RCS and Gnu-Emacs, so that I can change code and usually have a
method of undo'ing my additions.  It is not fun to learn this the hard
way!  Also, tools like profilers and symbolic-debuggers really help
when you are stuck or are fine tuning...no matter what strategy you use.

>Besides, it gets cold out by the PC.  If I bring my notebook to bed and
>scribble there, I stay comfy and warm. (And so does my wife.)

     Designing programs in bed can be fun, but my girlfriend really
hates it when I have finally settled down to sleep, only to exclaim
"hey, wait a minute!" and go back to more designing.  Insights come at
the worst moments sometimes!

>-Paul S. R. Chisholm, {ihnp4,cbosgd,allegra,rutgers}!mtune!lznv!psc

     The above are what I have learned in school and by making a lot
of mistakes at my work.  I would be glad to continue this topic with
anyone (esp. the original poster) over email.

					-Chris
-- 
Christopher Lishka                | lishka@uwslh.uucp  
Wisconsin State Lab of Hygiene    | lishka%uwslh.uucp@cs.wisc.edu
Immunology Section  (608)262-1617 | ...!{rutgers|ucbvax|...}!uwvax!uwslh!lishka
"...Just because someone is shy and gets straight A's does not mean they won't
put wads of gum in your arm pits."
                          - Lynda Barry, "Ernie Pook's Commeek: Gum of Mystery"