There is no spoon.
Seriously though, I beleive that the flash
that you where refering to is when you realize that you did it wrong in the 1st place. I rarely use perl's debugger. At most, I run -c just to see if I don't have a typo somewhere, but TRUE debugging, very rare. Mind you, that, I'm not a programing super-hero or anything of the sort. Its just my way of doing things.
When scoping through code, instead of trying to find the logic in what was just written, I find it more productive to review the logic itself and what it was I was trying to accomplish in the 1st place (ie: read it as if I were reading perlmonks). This is a habbit I aquired when reviewing trainees' coding. I always ask myself, "How would I do it?"
even if the code is mine. I just pretend it isn't.
Invariably, I'll hit the bad spot (if it isn't just a typo) during the 1st run through. Else, I give it to someone else to read and come back to it later. It also helps to explain out loud why each line is written the way it is.
Just my R$0.02 (Brazilian two cents) worth.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||