Think about Loose Coupling | |
PerlMonks |
Re: Simplicity vs. Doing It Rightby jplindstrom (Monsignor) |
on Oct 13, 2002 at 09:45 UTC ( [id://204879]=note: print w/replies, xml ) | Need Help?? |
Using a module is not only about reusing code. It's also reusing knowledge about the problem domain.
This is good, because if you don't know how to solve the problem in the first place, how do you know what you need to know to not do something stupid? Well, you don't. Sometimes that matters, sometimes it doesn't. But as time passes, things change, and it usually ends up being imortant because things never stay as simple as they seemed at first glance. Using a module is also reusing experience. A module probably (hopefully :) has time in production, which means someone else already encountered the first real-life, non-standard-compliant, oh-that's-how-we-really-do-things-here practical problems and solved them. I see this all the time with co-workers doing stuff in C or C++. Like writing your own mail parser (for a mail-to-db gateway). One program breaks constantly (ok, now, a year later it's a bit more stable after n fixes) because all of a sudden a weird mail format makes its way to the mailbox, or we switched mail server and the program doesn't know how to POP anymore because it made some unnessecary assumption about something. And all the time I think to myself "find a library", "I know a module that does that", and "don't implement that yourself, it's already been done!" The problem with other languages that we don't have with Perl isn't that there are no libraries available. It's that a) people can't find them, and b) people can't try them before buying them, so they don't try them. /J Update:Typo.
In Section
Meditations
|
|