I recently started a new job as a unix admin, a large part of my job is coding perl, which is one of the reasons I took the job. I have been shown a somewhat hefty repository of code. I was hesitant to comment on it since the other (senior) members of the team wrote it. These senior team members comprise a knowledge of UNIX administration that not only cuts wide, but deep. Each is proficent in different areas: C, security TCP/IP, etc... Anyway... When I saw the code I immediatley started rewriting it -largely to suit my own style (at first). I started by adding
use warnings; use strict;
fixed what was being complained about and then moved on to replacing large if .. elsif .. else structures, and added some comments. To be fair - it wasn't horrible code, just lacking structure and style, and what I consider a few peices of ugliness thrown in to get a job done quickly when under pressure.

Now I have these programs cleaned up and in some cases not recognisable by the original coders. To boot Ive only touched the tip of the iceberg

How do I present this to them? Do I just say I changed a few things to match my coding style? Do I point out the errors? Keeping in mind that I on some level report to these people, whom I also rely on for their knowledge in areas where I am lacking.

Id also be interested in hearing how others have dealt with similar situations.

Ted
--
"That which we persist in doing becomes easier, not that the task itself has become easier, but that our ability to perform it has improved."
  --Ralph Waldo Emerson

In reply to Consideration for others code by tcf03

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.