in reply to RE: RE: RE: RE: On elegant coding...
in thread Just thinking ...

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.

  • Comment on RE: RE: RE: RE: RE: On elegant coding...