Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Planning your software before writing

by merlyn (Sage)
on Jan 08, 2001 at 20:39 UTC ( [id://50503]=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://50503]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-06-17 02:00 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.