Re: Code beautifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 Jul 2008, at 19:31, mike wrote:
On 7/24/08, Stut <stuttle@xxxxxxxxx> wrote:

That's not just bad, it's downright anti-productive. You need to either have a standard style across a team or accept that other developers format their code differently. If you spend time reformatting other peoples code it's a waste of your time. Differently (not that I didn't say badly) formatted code does not make it wrong, it's just different and if you can't live with that
then you need to work on getting your preferred format adopted as the
standard for the team.

We've shown the team and new people join all the time. They bring
their own styles, use crap editors which leave extra linefeeds,
spaces, etc. all over. It's fine, as I am reviewing their code anyway,
it helps me think clearer, and since I have to support fixing the bugs
later on, I can go back to it and read it quicker as well.

Now if I was just cleaning it up and never seeing it again, yes, it
would be a waste of time. But everything usually falls on my plate
when nobody else can figure it out.

Obviously you can run your team the way you want to, but personally I prefer to get all my developers singing from the same hymn sheet such that after a couple of weeks they can go to any part of the code and not see a horrific mess because they're used to the coding style and be able to conform to that style when they make changes.

Any half-decent developer should be able to adopt any style they're told to. Likewise they should be able to use any editor you tell them to, but even if you would prefer to be flexible in the name of productivity there are very few editors beyond Notepad that can't use a particular EOL and auto-strip trailing spaces. As far as extra linefeeds "etc" that's all coming from the developer unless you're using WYSIWYG editors. I've met far too many developers who don't care about formatting their code and unless you slap their nose for it they won't change.

Yes it takes effort, and yes you will meet resistance, but for me the benefits of getting everyone in sync are worth it.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux