Re: Code beautifier
| From: | Stut | Date: | Thu, 24 Jul 2008 19:08:57 +0000 |
| Subject: | Re: Code beautifier | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-277270@lists.php.net to get a copy of this message | ||
On 24 Jul 2008, at 20:01, mike wrote:
On 7/24/08, Stut <stuttle@gmail.com> wrote:Showing them is rarely enough, even when accompanied by a reasonable logical argument. Developers get stuck in their ways (I know I am), but if you enforce a certain standard on them you don't leave it open to their preferences.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.Heh, I'd love to see you try to tackle the team I'm on. No matter how many times I show them things, no matter how many simpler methods of coding we provide (I have a custom library to make life easier) they still find new ways since PHP is so open to create obtuse and overengineered solutions for the simplest of things. It's a never-ending evolutionary process that will probably continue to be never-ending.
It really doesn't matter what language they're used to using, it's all text and I'd have to say that my experience is that there are too many developers of any language out there who don't care about formatting their code. I've even seen poorly formatted Python code which I thought would be difficult to accomplish, but apparently I was wrong.Any half-decent developer should be able to adopt any style they're told to.I never said the quality of developers I had to work with :p Most are decent in their respective fields, but PHP is new to most people here. It appears that most .NET/Microsoft style coders don't care about whitespace, tab however they wish, etc, even though VS editors try to help them, it always comes out with extra white noise.
But you must see that if you only needed to fix the bugs not modify the entire file that would benefit you and the team. In addition it keeps asset management diff's clean and focused. Anyhoo, on with the daily grind. -Stut -- http://stut.net/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.Eh, I've shown my way many times... it doesn't really help. Besides, most of the time I have to review this stuff anyway, or go back and fix bugs in it, so I'm already messing with the code to begin with.