in reply to Planning your software before writing

I'm a sort a "start at the top and bottom and meet in the middle" guy. I think about the top level algorithm first, coding it in understandable chunks, calling stubs for most of the functionality.

Then I look at code reuse, and figure out what bottom chunks are already written for me, and start writing glue in between the top level and bottom level. If I'm missing low-level technology, I code that, trying to be general enough to solve this problem as well as the next couple of predicted revisions or reuses. I've written a lot of code in my life, so predicting reuse is pretty second nature. {grin}

I run my program after adding about every 10 lines of code or so, stopping to insert print statements if it doesn't run right. I never have to look at more than 5 or 10 lines to debug then. The program becomes its own test harness.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Planning your software before writing

Replies are listed 'Best First'.
Re: Re: Planning your software before writing
by belize (Deacon) on Jan 08, 2001 at 21:27 UTC
    This is the way I have been programming also and have found it awful when it comes to upgrading, modifying, trouble-shooting, especially a year or so after implementing. There seems to be an inordinate ampount of time spent trying to figure out what I've done.

    I think this method might work well with small applications, but as move on to bigger things on the net, it appears to reach a limit of usefulness.

    Of course I am not in the same league as merlyn when it comes to programming perl.