Do you have a coding mantra? Some phrase or saying (or question) that you repeat to yourself while coding?

In a recent rare moment of self-awareness while coding, I noticed a little voice repeating "How am I going to debug this? How am I going to debug this?" while my fingers were typing

... my $html = $template->expand(\%bindings); return $html; }
I stopped and looked at what I'd typed, and considered for a moment why I hadn't typed
return $template->expand(\%bindings); }
or just
$template->expand(\%bindings); }
The reason goes way, way back to having looked over the shoulder of a really good programmer early in my career. I asked him why he was seemingly wasting a short-lived variable, and he answered that he was always on the lookout for places where he would later need to place breakpoints to examine intermediate results while debugging, and that sometimes he had to make opportunities. He went on to explain that debugging time was part of overall productivity (duh, once you've gotten that point), and that planning for debugging kept debugging time down. It seemed like a really good explanation, and from then on I would mutter "How am I going to debug this?" to myself. Over time, that voice faded into the background, but it's still there, chanting away. The funny thing is that I rarely have to use breakpoints when debugging, even though I automatically make opportunities for them.

What is your programming mantra?


In reply to Programming Mantras by dws

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.