Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
To me, more idiomatic is what you said

Hmm... I was using "idiomatic" in the sense of a rarely used word that's only used or understood in the right circles; just as more "advanced" perl features like typeglob tricks or XS code might be.

Granted, it can also be used to mean "the way people commonly talk"; and this usage is from the standpoint of the small group of idiomatic speakers.

Since I try to code using the simplest expressions that convey my meaning clearly and concisely, I tend to mentally associate myself as being outside the circle of "perl experts"; I really *don't* want to fall into the habit of (ab)using typeglobs for everything if I don't need to. My ex-boss is a cautionary example for me now, I guess...

One day, many years ago, while feeling "clever", I wrote a single regular expression that would reformat text paragraphs to any given line length. And then I gave it to my co-workers as an amusement. None of them could guess what it did at a glance. Then I carefully documented how the regular expression actually worked, and came back with a full fifteen lines of documentation for a single line of code.

And then I went back, and re-wrote it in the boring, obvious way, in ten lines of simple perl. All of my co-workers could understand it at a glance. It wasn't "clever", but it was better code, because it was easier to maintain.

That's the usage of clever I meant; cleverness for it's own sake, not for the sake of good code. Good code is often bland, just as good documentation is often bland. Both should quickly convey the intended information, with a minimum of fuss or wasted time.

Granted, convincing your boss of that is an entirely different story.

Fortunately, he's not my boss anymore! :-) Unfortunately, I have to maintain thousands of lines of incomprehensible code. :-( It's win/lose, I guess...

In reply to Re^6: seeds... by Anonymous Monk
in thread seeds... by SamCG

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, 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
  • 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (5)
    As of 2021-01-21 21:14 GMT
    Find Nodes?
      Voting Booth?