Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site tilt.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!tilt!chenr From: chenr@tilt.UUCP (Raymond Chen) Newsgroups: net.lang.c Subject: Re: Comments on book review Message-ID: <91@tilt.UUCP> Date: Tue, 1-May-84 21:30:52 EDT Article-I.D.: tilt.91 Posted: Tue May 1 21:30:52 1984 Date-Received: Wed, 2-May-84 06:03:17 EDT References: cubsvax.219 <2414@ecsvax.UUCP> Organization: Princeton Univ. EECS Lines: 45 >> The referenced article refers to the textbook approach to programming, i.e. >>design, program, debug. The book in question even suggests that failing to >>plan the program out carefully before writing is dangerous and bug-prone. The >>author of the article asks if anyone actually programs that way, and what >>people think of that approach. >> Well, I for one subscribe to the notion of "stepwise refinement" or >>(more poetically) "creeping elegance." The idea is to write a program that >>(1) is small (2) does at least some of what you want the final program to >>do, or shoots in that direction (3) works and (4) is easy to modify. >> This makes it possible to program almost bug-free, and to catch bugs almost >>as soon as they occur (so you don't have to go on a bug-hunt later on). The >>idea is to keep adding to the program until you get what you want (or maybe >>something better). A big plus to this approach is that the program remains >>modifiable - one of the reasons for the high cost of software maintenance >>(I suspect) is the tacit assumption that the program will never have to be >>changed. If you know for a fact from the word go that mods are coming, you'll >>write a better program most of the time. And certainly one that is easier to >>fix and improve. >> So no, I don't believe in plan-code-test. I believe in plan a little, code >>a little, test a little, plan a little, code a little, test a little.... >> Long live Yourdon! >> >> Best, D Gary Grady, Duke University >> {decvax or whatever}!mcnc!ecsvax!dgary Fine. Incremental programming can be a wonderful thing. I think, though, that you're missing the point of the book and that is that you don't start putting code into your computer until you know *exactly* what that code is going to do. After all, the idea behind programming incrementally is to do it in small steps so you can make sure that each step works. What that book was coming down on was what a lot of people tend to do and that is to sit down at a terminal with the specifications/goals and start typing a program without taking some time to make sure that what they're going to do will work, or even to make sure that they understand in toto, what the program is supposed to *do*. No matter how you write the system, the idea should be to avoid design/logic errors, and in most cases, make it extendable and maintainable. -- The preceding message was brought to you by -- Ray Chen princeton!tilt!chenr