I guess it all depends on your programming mentality. I've been at it for a while now (although not all Perl), and I have never been able to stand writing more than a few lines of code without checking that it works.

This is probably a personality thing - I just get really depressed if I can't see the results of my code running every half hour or so. I have this dread of writing some elaborate routine that takes ages to implement, and then discovering that I can't do it like that and having to scrap all that work. I have to say since I came to Perl that's happened a lot less :)

I also can't imagine coding without half a dozen help windows open showing the docs for the modules I'm using in my program. I do know people who like to do the whole program in one shot, then go back through and pick up the problems later. Personally, I can't stand debugging, so I do whatever I can to make sure I never have to do a huge debug session. I dread trawling through thousands of lines of code to find the bug.

Also, similar to the tip mentioned above, I usually have a window open to a program called test.pl, wherein I test anything that I'm not totally sure of. A lot of my program gets written in there, and then copied in to the body of the main bit when I'm totally sure it workd.

____________________
Jeremy
I didn't believe in evil until I dated it.


In reply to Re:(Jepri) Never guess at code! by jepri
in thread Never guess at code! by nysus

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.