/me nods ...
I learned a huge lesson about computer programming when I first encountered the following comment in source-code:
Dig me up and I’ll fix it then.
But, you know, it’s true. Even though none of us likes to think about mortality, our source code will probably out-live us, even by a considerable interval. And, even if it does not, we always need to write for maintainability. If digital computers are not quite fast enough to execute our object-code now, you can be sure they will be in the near future. But the source-code will still be there, regardless. Therefore, above all other things, make your intentions of the moment abundantly clear, and strive to do so in a way that will create the least amount of headaches for your successor. (Too bad for you ... sux that a bread-truck was at just the wrong place at just the wrong time ... and by-the-way so were you). Change will come, and your if-statement will not last forever.
Most of all, the person who makes that change wants to be able to make his or her change without disrupting, and therefore having to re-test, your original source-code. Don’t get hung-up about “efficiency.” Don’t indulge in cleverness of-the-moment in sacrifice of maintainability of-the-future. If you do that, people just might throw AOL floppy-disks at your tombstone out of spite.
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.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||