Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Good post!

Pick on a common example of code that can easily be improved using idiomatic constructs. Something like changing C-style for(;;)'s to foreach(@array) or map{..}@array. Make the first change manually explaining the reasons and benefits,

I realize you probably just quickly chose a this construct as an example. But your choice is unfortunate.

Changing C-style loops to foreach loops is not as trivial as you would have it appear. The presentation would be impressive, but misleading.

I might point out the advantages of foreach loops. And how the C-style loop is more cumbersome but more adaptable. These folk are probably very comfortable with this C phrasing. Saying this is how to improve the code is unnecessary optimization and quibbling over style at the risk of breakage.

I like presentations that include workload and mental state, to wit:

"It took me two hours to decipher this code."
"Thirty minutes to get this rewrite, that has these problems. Notice how I used ..."
"A hour of exploratory testing and minor tweaks. At this point I felt like I had a good understanding of ..."

To the original post:

If these are not fairly simple scripts and requirements are vague I'd first want my crew to instrument the old stuff to tee off both I and O on demand. Assuming this is reasonable.

I cannot imagine the function-free java code these people are writing.

In reply to Re: Re: What training do YOU need? by rir
in thread What training do YOU need? by deprecated

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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 wandering the Monastery: (8)
    As of 2015-03-27 08:58 GMT
    Find Nodes?
      Voting Booth?

      When putting a smiley right before a closing parenthesis, do you:

      Results (600 votes), past polls