Good day fellow Monks,

I have a question about algorithm design. Most of the Perl scripts I've examined on the site of that I've written (or more precisely, attempted to write) were created to accomplish a specific task. They involved maybe one or two algorithms to do so, and some algorithms were a bit more complicated than others.

Most professional programmers will tell you that you should do a minimum of design when building an application (that minimum varies between each programmer). But application design tends to describe the overall architecture of the program, not the algorithms.

Since Perl scripts are mostly algorithms, OO design (and other methodologies) doesn't apply here. So how do you go about designing your scripts? Do you simply bring up VI/Emacs and start coding? Do you use an algorithm design tool (like a flowchart diagrammer)? Pen and Paper?

My current approach has been writing out pseudocode, which lets me think in terms of the task, and not of the language.I find that my scripts are usually much cleaner and simpler, and that they run the first time I try them. The other benefit is that they're much easier to explain and document for others on my team. I'd like to streamline this process a bit, make it more efficient.

Thanks in advance for your advice,

Phemur


In reply to Algorithm design by Phemur

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.