Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!princeton!njin!rutgers!uwvax!uwslh!lishka From: lishka@uwslh.UUCP Newsgroups: comp.software-eng Subject: Re: Writing code by hand (was: Basics of Program Design) Message-ID: <350@uwslh.UUCP> Date: 7 Jul 88 13:53:16 GMT References: <900@td2cad.intel.com> <3537@pdn.UUCP> <1559@microsoft.UUCP> <1335@hp-sdd.HP.COM> <1398@lznv.ATT.COM> Reply-To: lishka@uwslh.UUCP (Fish-Guts) Distribution: na Organization: U of Wisconsin-Madison, State Hygiene Lab Lines: 50 In article <1398@lznv.ATT.COM> psc@lznv.ATT.COM (Paul S. R. Chisholm) writes: >< "Would you buy a used operating system from these guys?" > > >Exactly why I *don't* use vi in the design stage! I've got a terrible >memory. Managing complexity is something I've got to be very >conscientious about. My first hack at a top-down design is usually >nowhere near right. With an editor, I'd just change the lines. On >paper, I either cross out a couple of lines, or just start on a fresh >page. (Bound notebooks are useful, because I don't misplace the old >design.) This way, when I'm a third of the way through, I can very >easily pick up the good parts of the previous design attempt. Not to pick on VI, but this is why I use gnu-emacs. It has "infinite" undo. If you make a *big* mistake you can undo to your heart's content. I have done quite a few times. Also, gnu-emacs has different buffers, so if I need to save a piece of the file I am editting, I just yank out the code to be changed and safe in a spare buffer for the time being. Same with backup files...keep a backup of previous code that you might need to revert to. >SCCS and such don't help in this phase. I hate logging a mistake in >the source database. An operating system that stores the last n >versions of a file can help, sort of. You often find that the old >stuff you wanted was in n+1 versions ago. This fear discourages you >from saving your work often, which can have other bad effects. I am not sure about SCCS (I have never used it), but RCS has a tree-like structure for revisions. Mr. Tichy wrote a good article on it, which describes the system better than the documentation available; I can get the reference if you are interested. >And designing on paper has one great advantage: I can write about >other stuff in the margins. So true. Now that would be a *really* good innovation for computers...margins to write things in (in editors). Maybe I'll hack up gnu-emacs to do this ;-) >-Paul S. R. Chisholm, {ihnp4,cbosgd,allegra,rutgers}!mtune!lznv!psc >AT&T Mail !psrchisholm, Internet psc@lznv.att.com >I'm not speaking for my employer, I'm just speaking my mind. -- 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"