Aighearach wrote:

Not only the organisms with the highest populations survive, and survival techniques that would fail in most places, are ideal in others.

You are right about techniques that fail in some places surviving in others. But what does this have to do with good coding practices?

Scenario: Creature 'foo' has stubby little legs that doesn't allow it to outrun creature 'bar'. Thus, bar eats foo and discovers a belly fully of credit card numbers because foo didn't use taint checking or strict or ...

This analogy is fails because Darwinian arguments don't reflect the nature of programming. If some deer in the wild dies, he doesn't take me down with it. If someone's database munging script is corrupting data, those are my medical records that are being screwed up.

As for the chess analogy: I'm sure you've tried to teach someone how to play chess. You've probably patiently explained why opening with a rook pawn is a bad idea. You've probably explained why getting the queen into the fray early is not wise. Perhaps you've explained why using the King's gambit against a player with superior tactics is a stupid. If so, you're helping them unlearn bad habits, even if you didn't use that term.

I remember how patiently my first Kung Fu instructor kept explaining to me why I need to curl my toes on a front snap kick. I didn't "unlearn" my bad habit of keeping my toes straight until I actually kicked something one day and nearly broke every toe. Pain is a great teacher. In fact, that's how I think most people learn. In chess, the pain of losing teaches those who wish to learn. After I hurt my foot and hobbled for a few days, I learned to curl my toes when I kick. After some programmer gets fired for ruining their company's data, perhaps that programmer will "unlearn" bad habits.

Cheers,
Ovid

Vote for paco!

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to (Ovid) Re(5): A question of efficiency by Ovid
in thread A question of efficiency by c

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.