perl is not a panacea! and this is exactly the issue.

Nobody has said perl is a panacea. What makes you think that this just applies to Perl?

everybuddy was written with 0 expandability, and it got rewritten twice 'cause no one could add simple things. heck, register.com is written in perl with 0 expandability and it was pure HELL trying to do things like, changing prices or changing behavior or writting api'

I'm unsure of the point you're trying to make here. Can you clarify?

If you write for one way of expanding, and it doesn't work out, you still have something to mold. if you don't plan at all, you wind up with silly things like, 500 line functions, duplication of code, or just ugly algorithms that require more rewriting than refactoring.

By definition if you end up with 500 line functions and tons of duplicate code you do not have a well factored program. Nobody is saying this is a good thing.

Unless I am misinterpreting you are saying that the code got to this unmaintainable state through lack of upfront planning and design. This may be true.

Two questions:

  1. Does upfront design always lead to good code?
  2. Is upfront design the only way to get to good code?

In my opinion the answers are "No" and "Yes" respectively.

Requirements change, often radically, during the lifetime of a project. Because of this design decisions made early in a project can turn out to be incorrect. This leads to code being thrown away and exactly the mangled codebase you were describing.

In my experience if you continually keep your program well factored (no duplication of code, no duplication of intent, etc.) it is better to add the infrastructure for a feature at the point it is needed, rather than adding the infrastructure upfront, for the reasons previously outlined.


In reply to Re^9: Best way to 'add modules' to web app? by adrianh
in thread Best way to 'add modules' to web app? by BUU

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.