I read sometime that creating algorithm for given problem is much harder than finding the uses of algorithm. If the steps between answer code and problem are described in detail. then that would be helpful to solve many more problems.

I'm not sure i necessarily agree with this statement. It would seem to me to imply that you're going off creating algorithms without a clear idea of what you want.

Documentation should be a part of your solution design anyways. From a design perspective the method i use to describe an algorithm is a UML / use case based approach. This gives me enough room to break down the problem then describe its components to a very detailed level including exceptions.

It will also solve one more problem in the long run: Documentation.

Anyone who is serious about their projects and the long term viability of their code should have their algorithms and application design documented anyways. It eliminates (or reduces) the bus factor associated with many shops. In a broader sense, on one hand no documentation may equal job security, but on the other hand, it also means you cant get promoted.

Its not really clear to me what you're attempting to demonstrate here.. colaborative design effort? code reuse, best practice?

Lots and lots of code ends up being one offs, and quite often taylored for a specific purpose - meaning the algorithm is really only useful in that situation. Looking at a wider picture there are lots and lots of permy solutions/algorithms that are designed as reusable solutions. Check out CPAN, a perfect example.

One of the things I love about perl is it is easy to go both ways. A dirty hackup that will do the job just that once for you can be written quickly, as can a more robust library that can fit into your growing toolbox...


In reply to Re: Solution Approach by Ryszard
in thread Solution Approach by artist

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.