http://www.perlmonks.org?node_id=551665


in reply to Consideration for others code

When you change other peoples code, you must be VERY diplomatic. That being said, remember the saying: "Diplomacy: The art of saying 'nice doggy' while you reach for the pepper spray."

Sometimes it is easier to push the bad aside and do the whole task from scratch. Then you have "new improved". The problem is that it must be "improved", being "new" doesn't make it better. Unfortunately many projects fall into the "it's new" catagory, when the old was very adequate for the task at hand. Think: an old (manual) typewriter with carbon paper at a remote location without power works quite well for a page or so a week.

Replies are listed 'Best First'.
Re^2: Consideration for others code
by DaveDay (Initiate) on May 26, 2006 at 18:44 UTC
    Bring a copy of Damian Conway's Perl Best Practices into the office and let folks see you consult it. You can use it to stimulate conversations. Tell your co-workers that you, by and large, try to adhere to his ideas. Get Perl::Critic up and running on your editor - I use Vim and Vim's Perl IDE plugin. Using it is easy and fun. Perl::Critic will check whatever code you have in the current buffer against Conway's Best Practices and loads any violations into a "Quick Fix Window" which will take you one by one to each violation and tell you what is wrong and how to fix it. This makes it painless to 1. Learn the 256 best practices and 2. Quickly and efficiently bring a piece of code into pretty good form. It even suggests areas of code that need refactoring. This way, Damian is making the suggestions for refactoring - not you! I have found that turning this aspect of coding standardization over to Perl Critic frees me up for those things that only a person can do - such as designing the APIs and algorithms. I am quite happy for the freedom it gives me. Plus your coding conventions are designed by arguably to number two person in the Perl world right now! You can easily turn off any rules you don't like or silence it temporarily while you use symbolic references.
Re^2: Consideration for others code
by Anonymous Monk on May 26, 2006 at 18:33 UTC
    Bring a copy of Damian Conway's Perl Best Practices into the office and let folks see you consult it. You can use it to stimulate conversations. Tell your co-workers that you, by and large, try to adhere to his ideas. Get Perl::Critic up and running on your editor - I use Vim and Vim's Perl IDE plugin. Using it is easy and fun. Perl::Critic will check whatever code you have in the current buffer against Conway's Best Practices and loads any violations into a "Quick Fix Window" which will take you one by one to each violation and tell you what is wrong and how to fix it. This makes it painless to 1. Learn the 256 best practices and 2. Quickly and efficiently bring a piece of code into pretty good form. It even suggests areas of code that need refactoring. This way, Damian is making the suggestions for refactoring - not you! I have found that turning this aspect of coding standardization over to Perl Critic frees me up for those things that only a person can do - such as designing the APIs and algorithms. I am quite happy for the freedom it gives me. Plus your coding conventions are designed by arguably to number two person in the Perl world right now! You can easily turn off any rules you don't like or silence it temporarily while you use symbolic references.