tcf03:

Tread lightly! The appearance of code is a "religeous war" issue to some people. Until the code becomes *yours* (i.e., you're the primary maintainer), change the code as little as possible. I'd definitely add "use strict" and "use warnings" statements to the top, and fix errors as they appear. But you should use the same style as you find in the (ugly...to you!) file.

(It never ceases to amaze me how much time can be pissed away by people reformatting each others code.)

Once the code becomes yours, however, then you can start on structural and stylistic improvements. (As your schedule allows....)

Also, there are politics involved: At one place, I was maintaining some code that I thought ugly. In a couple of places, it was particularly bad, so I was complaining about it to my boss. About a month later, I found that my boss was the one who wrote that code. It took me several months to fully extract my foot from my mouth...... 8^P

It's also possible that you may come to appreciate the style in use. (I've changed styles more times than I care to count. It's amazing what you can get used to quickly.)

Of course, the code *could* just be a hideous mess with no style. Even then, I'd restrict myself to bug fixes until I inherited it. And never badmouth code until you know who wrote it! ;^)

--roboticus


In reply to Re: Consideration for others code by roboticus
in thread 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.