in reply to Re^10: Legacy Code: "Dominoes = Bad"
in thread Legacy Code: "Dominoes = Bad"

Using the example of a system of many non-trivial CGI's, implementing something such as CGI.pm for reuse across all of them is going to be more maintainable and less work than rolling your own unique, simplest-method parser for each.
How so? You still haven't shown how CGI.pm is easier maintained than code I wrote myself.

Or is your position that code written by someone else and put on CPAN (or made part of the Perl distribution) is immune to requirement changes, but any code I write myself is subject to changes in requirements? Because that's seems to be the assumption behind the "all code must be maintainable" - that all requirements change, and that code isn't static.

Meanwhile, I'm still waiting for a piece of non-trivial code, written in a simple way, that would have taken less time to write if it was written in a "maintainable way".

Replies are listed 'Best First'.
Re^12: Legacy Code: "Dominoes = Bad"
by Boldra (Curate) on May 01, 2011 at 19:19 UTC
    Code which uses CGI.pm is easier for ME to maintain than code which uses something you wrote!


    - Boldra

      How about if what he wrote used the same interface, but a much lighter, simpler implementation. Eg. CGI::Simple? How does that affect your cost/benefit analysis?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
      Code which uses CGI.pm is easier for ME to maintain than code which uses something you wrote!
      That's quite a bold statement. Considering you don't know my non-existing code, it must be solely based on the quality code CGI.pm provides.

      But still, how come

      use CGI; ... your code ...
      is more maintainable than
      use JavaFan::CGI; ... your code ...
      ?
        Purely because I rarely need to refer to the documentation for CGI.pm. I'm saying I would rather work with something I am familiar with, all other things being equal.


        - Boldra