[Tutor] Planning out your program

Scot W. Stevenson scot@possum.in-berlin.de
Sat, 14 Sep 2002 17:50:28 +0200


Hi there, 

> I tend to program in a top down approach, which is proceeding from most
> abstracte and generalized to most specific.

I would second Kirk's approach, and add that a good book on these things is 
"Code Complete" by Steve McConnell. Note that it is a Microsoft Press 
book, which means that they are helping to train the next generation of 
open source coders here - unless, of course, you are actually working for 
Microsoft =8). 

> 3. outline the steps it has to go through to accomplish this. Flow
> charting may    be useful here.

I have found sitting down with pencil and paper and making a rough list of 
objects I think I need very useful, as well as lists of what they are 
supposed to do to each other. Nothing fancy like UML, just a bunch of 
boxes and arrows. 

> 4. build a skeleton program, and import a few modules you know you will
> need. 

The skeleton version usually includes all of the functions I think I'll 
need, but as dummies:

def something(stuff):
    pass

so that I have a "viable" program very quickly, and can then code function 
after function, testing the whole thing after each move.

Y, Scot

-- 
 Scot W. Stevenson wrote me on Saturday, 14. Sep 2002 in Zepernick, Germany  
       on his happy little Linux system that has been up for 2127 hours       
        and has a CPU that is falling asleep at a system load of 0.03.