Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found