Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I have gradually arrived at a quick and dirty "get something up and running" system.

I break the task down, often something like:

get_input(); process_input(); output();
Each sub would have its own script which would read its input from disk, call the sub and then write its output to disk ready for the next sub. If the input/output is large scripts can be written to validate/produce reports.

The same process maybe repeated with each task depending on complexity or if I'm stuck. In these cases there can be a string of scripts testing quite short subs.

When there is reasonable confidence in the parts it is a case of fitting everything together.

This way I can convince myself that I have some working code with only a small bit that doesn't work rather than a lot of code that doesn't work at all. :-)

It's entirely conincidental that when you're _really_ stuck you have a shortish piece of code, some test input data and, perhaps, an example of the output you need. Very handy if you ask the monks for help!

I have some arbitary rules of thumb:

  • Everything must fit on a screen. Subs, loops, if/else blocks.
  • Use subs to avoid deep indenting rolling across the screen.
  • No hard coded data - at all. Use a config file.
  • Use a look up table even if most of data is the same or undef.<.li>
  • Don't sweat over arbitary rules of thumb
Later on down the line you can go back over it and reduce the number of subs.


Oh yes, if there is an and an or and a not on the same line the code is just plain wrong. Rewrite it because you'll (me, at least) never ever get it right. :-)

In reply to Re: [development] Let's get it started quick'n'dirty! by wfsp
in thread [development] Let's get it started quick'n'dirty! by blazar

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (3)
    As of 2020-05-25 18:45 GMT
    Find Nodes?
      Voting Booth?
      If programming languages were movie genres, Perl would be:

      Results (146 votes). Check out past polls.