Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Best way to 'add modules' to web app?

by BUU (Prior)
on Jul 05, 2003 at 00:08 UTC ( #271564=note: print w/replies, xml ) Need Help??


in reply to Re: Best way to 'add modules' to web app?
in thread Best way to 'add modules' to web app?

>>One rule of thumb is, "If I'm thinking about features I don't need yet, I'm probably going to design and implement them wrong and will have to rework them when I really do need them."

Really? It seems to me that the advice most often given here is to "always plan ahead". Why do you reccomend something different?

I've had some personal experience with not planning ahead and having to rewrite large portions of a project and I'd like to try to avoid that this go-round.

As to the higher idea of modules in general, I hadn't planned on implementing this modules myself, but rather providing an easy to use framework that people could easily develop their own or share their developed modules. Basically what I'm looking for is a way to provide a 'patching service' to change how one or more features work, but without resorting to some projects that have patches like "go to line 23 in foo.php and replace all the lines until the next semicolon and then go to line 56 and replace two variables" and so on and so forth.
  • Comment on Re: Re: Best way to 'add modules' to web app?

Replies are listed 'Best First'.
Re: Re: Re: Best way to 'add modules' to web app?
by chromatic (Archbishop) on Jul 05, 2003 at 07:34 UTC

    I've never planned more than a few features ahead without having to revise the plan heavily. Instead, I prefer code that I can change easily. This is exactly how I avoid rewriting.

    When I program, I continually ask myself two questions. The first question is does this work as I need it to work? and the second is is this as simple as I can make it right now?. My goal is provably working software that's as simple as possible.

    Simple is a loaded term, but I mean that my code should only be as complex as necessary to pass the tests. Part of that comes with experience. Part of that comes as I recognize more and more patterns in my code. Since I have oodles of tests, it's reasonably cheap to continue to simplify.

    Because I work in small steps, adding one feature at a time, always testing and always simplifying, I'm confident that I'll always be able to add new features relatively inexpensively. It's also nice to say, "I'm done already? I can't think of any more tests to write. The feature works. I wrote far less code than I thought I would need."

Re: Re: Re: Best way to 'add modules' to web app?
by chunlou (Curate) on Jul 05, 2003 at 00:45 UTC
    I guess there's different between planning based on what you know for sure you need and planning for contingencies. It's too hard and impractical to try to tackle all potential contingencies--not that you shouldn't plan at all, just make sure you know correctly your priority.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://271564]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2017-12-11 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (288 votes). Check out past polls.

    Notices?