My reasoning behind posting an alternate appearance wasn't vanity, but more of a reminder that elegance (with respect to code) encompasses many elements: utility, effectiveness, structure, layout, intelligent use of the language and its abilities, and so on. Often, when we try to evaluate one implementation's elegance, we (as a race) tend to focus on one element, not the whole. When we do this, we risk inadvertantly dismissing something out of hand because it doesn't conform to our personal set of "coding ethics."

Personally, I often don't realize code is elegant until after I've seen it, played with it, stretched it around, and (quite likely) crashed my server trying to "improve" it. The realization comes unexpectedly, almost in a flash of wonder. "Oh, so that's why it was done that way. Ah-hah!. wow."

Again, I would hope that the community leaders and regulars wouldn't judge the initiates and novices too harshly because our code differs from the norm...when that difference doesn't really matter.

(If there's a security issue or something that's been overlooked technically, well, please....constructive criticism is welcome. I don't think any of us wants to be hacked or really wants to reinvent too many wheels.)

Going back to the snippets, both will compile (assuming I didn't make any typos) and perl will consider them essentially the same. So, if elegance becomes the watchword, doesn't it make sense to recognize the risk of (gently) criticizing things, well, inappropriately?

As an example, there are C++ communities that will stomp on you (hard) if you post something that uses too many lines or doesn't incorporate some exotic trick. As far as I've been able to tell by reading older nodes, that doesn't seem to happen often here. I hope that doesn't change.

-- f

P.S. For what it's worth, this is meant as a simple, conversation of ideas, nothing more. No water needed.


In reply to RE: RE: RE: RE: RE: On elegant coding... by footpad
in thread Just thinking ... by toadi

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.