Re: [PHP] Code beautifier
tedd wrote: At 6:47 PM -0400 7/25/08, Daniel Brown wrote: On Fri, Jul 25, 2008 at 6:29 PM, tedd [EMAIL PROTECTED] wrote: But, there's nothing wrong with starting a sentence with but. There, I even started AND ended with one. Correct, as I said, in Reader's Digest English. In proper grammar, it's tantamount to ending a sentence with a preposition[1]. However, even in Reader's Digest English (RDE[TM]), heading a word with but is acceptable but following it immediately with a comma is not[2]. 1: Hence the name, pre-position --- positioned before. 2: http://www.michbar.org/journal/pdf/pdf4article628.pdf As I see it, this is more of a When to use a comma thing than a but thing. I use commas like I talk. For example, I would never say: But that didn't happen. Instead, I would say But -- pause -- that didn't happen. So, I write it: But, that didn't happen. It's arguably more correct in this case to use ellipsis: But ... I could be wrong :) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Jul 24, 2008, at 5:48 AM, Richard Heyes wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? With 'what' in mind? Sorry, PHP. Not that this thread got off topic at all, but here's a listing (more than PHP): http://en.wikipedia.org/wiki/Prettyprint#Code_Beautifiers ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 9:06 AM +0100 7/28/08, Peter Ford wrote: At 6:47 PM -0400 7/25/08, Daniel Brown wrote: On Fri, Jul 25, 2008 at 6:29 PM, tedd [EMAIL PROTECTED] wrote: But, there's nothing wrong with starting a sentence with but. Correct, as I said, in Reader's Digest English. In proper grammar, it's tantamount to ending a sentence with a preposition[1]. However, even in Reader's Digest English (RDE[TM]), heading a word with but is acceptable but following it immediately with a comma is not[2]. It's arguably more correct in this case to use ellipsis: Okay, who said an old dog can't learn new tricks? Both you and Daniel have convinced me to stop using But, and start using But ... As I've said many times before: I've learned something new every day of my life... and I'm getting damned tried of it! Thanks, Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Jul 28, 2008, at 11:10 AM, tedd wrote: At 9:06 AM +0100 7/28/08, Peter Ford wrote: At 6:47 PM -0400 7/25/08, Daniel Brown wrote: On Fri, Jul 25, 2008 at 6:29 PM, tedd [EMAIL PROTECTED] wrote: But, there's nothing wrong with starting a sentence with but. Correct, as I said, in Reader's Digest English. In proper grammar, it's tantamount to ending a sentence with a preposition[1]. However, even in Reader's Digest English (RDE[TM]), heading a word with but is acceptable but following it immediately with a comma is not[2]. It's arguably more correct in this case to use ellipsis: Okay, who said an old dog can't learn new tricks? Both you and Daniel have convinced me to stop using But, and start using But ... As I've said many times before: I've learned something new every day of my life... and I'm getting damned tried of it! Butt... You're still alive to be apart of it :) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 11:20 AM -0400 7/28/08, Jason Pruim wrote: On Jul 28, 2008, at 11:10 AM, tedd wrote: As I've said many times before: I've learned something new every day of my life... and I'm getting damned tried of it! Butt... You're still alive to be apart of it :) As long as my butt is, I guess you're right. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 10:53 PM -0400 7/25/08, Daniel Brown wrote: On Fri, Jul 25, 2008 at 10:02 PM, tedd [EMAIL PROTECTED] wrote: [snip=1920's_anecdote] LOL So in the end, these were the things I remember being taught by English teachers. They taught me well -- but, nothing about writing. :-) That's one thing about being a teacher in an official capacity: your students are likely to learn from you, even if it's not what you're trying to teach them. In any case, it sounds like you've met people who prove the rather offensive adage: those who can, do; those who can't, teach. Yes, but this also tells me something about myself. In my younger years, my level of offensiveness provoked such non-professional conduct from others. Now I get it without having to do anything. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 3:17 PM -0300 7/24/08, Thiago H. Pojda wrote: On Thu, Jul 24, 2008 at 3:14 PM, mike [EMAIL PROTECTED] wrote: On 7/24/08, Thiago H. Pojda [EMAIL PROTECTED] wrote: sadly, I still go and reformat other coworker's code anyway, heh. Yeah, I'm -that bad- That's why I looked for a tool like that months ago. Big project from someone else, do you feel like reformatting hundreds of files with hundreds (thousands?) of lines manually? I do it all the time. In fact, I enjoy doing it (no I don't want to do it for anyone else). What I find interesting/entertaining is reducing the amount of code down to what's actually necessary and then reorganizing the code to make routines more optimum and generic. Most of the stuff I review is reduced considerably. In short, it's a great way for me to both learn and build my own library. When clients don't have me pounding keys for their service, I enjoy reviewing, rewriting code and creating demos. However, I would never use a Code beautifier because as I go through the code, the only code that get beautified is the code that I approve. When I see code formatted differently than mine, then I know it's suspect and I need to review it. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 7:22 PM +0100 7/24/08, Stut wrote: On 24 Jul 2008, at 19:14, mike wrote: On 7/24/08, Thiago H. Pojda [EMAIL PROTECTED] wrote: That doesn't work when you get code from someone else that wasn't prudent enough ;) I figured that'd be the reply - it's not my code ... sadly, I still go and reformat other coworker's code anyway, heh. Yeah, I'm -that bad- 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. IMHO. -Stut If what you are doing is for productivity, then I agree with you. But, not all coding is for productivity. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 8:10 PM +0100 7/24/08, Richard Heyes wrote: (and anal retentive) when you code :) I am; the problem is no one lives up to my standards... :-) Anyone else find the two sentences above used together disturbing? Something about anal and up that doesn't sound good. :-) tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
tedd [EMAIL PROTECTED] wrote: At 8:10 PM +0100 7/24/08, Richard Heyes wrote: (and anal retentive) when you code :) I am; the problem is no one lives up to my standards... :-) Anyone else find the two sentences above used together disturbing? Something about anal and up that doesn't sound good. :-) tedd So disturbing that it would be nice if I could add an appropriate image to it... ;) Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Fri, Jul 25, 2008 at 12:56 PM, tedd [EMAIL PROTECTED] wrote: At 8:10 PM +0100 7/24/08, Richard Heyes wrote: (and anal retentive) when you code :) I am; the problem is no one lives up to my standards... :-) Anyone else find the two sentences above used together disturbing? Something about anal and up that doesn't sound good. :-) This coming from a guy who, two messages prior, started a sentence with but. Reader's Digest-standard English aside, Tedd, Freud might have been right with you. ;-P -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
Daniel Brown [EMAIL PROTECTED] wrote: On Fri, Jul 25, 2008 at 12:56 PM, tedd [EMAIL PROTECTED] wrote: At 8:10 PM +0100 7/24/08, Richard Heyes wrote: (and anal retentive) when you code :) I am; the problem is no one lives up to my standards... :-) Anyone else find the two sentences above used together disturbing? Something about anal and up that doesn't sound good. :-) This coming from a guy who, two messages prior, started a sentence with but. Reader's Digest-standard English aside, Tedd, Freud might have been right with you. ;-P True, but but and butt are two very distinct words... ;) I know Dan, it's that grammar thing.. Even using the Queen's English makes it a tush for the push. ;) Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Fri, Jul 25, 2008 at 2:04 PM, Wolf [EMAIL PROTECTED] wrote: True, but but and butt are two very distinct words... ;) I know Dan, it's that grammar thing.. Even using the Queen's English makes it a tush for the push. ;) Just reading that opening sentence aloud was fun. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Friday 25 July 2008 20:10:30 Daniel Brown wrote: On Fri, Jul 25, 2008 at 2:04 PM, Wolf [EMAIL PROTECTED] wrote: True, but but and butt are two very distinct words... ;) I know Dan, it's that grammar thing.. Even using the Queen's English makes it a tush for the push. ;) Just reading that opening sentence aloud was fun. its just weird. Oh btw, this is a NERD list... =D -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- --- Børge Holen http://www.arivene.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 1:59 PM -0400 7/25/08, Daniel Brown wrote: On Fri, Jul 25, 2008 at 12:56 PM, tedd [EMAIL PROTECTED] wrote: At 8:10 PM +0100 7/24/08, Richard Heyes wrote: (and anal retentive) when you code :) I am; the problem is no one lives up to my standards... :-) Anyone else find the two sentences above used together disturbing? Something about anal and up that doesn't sound good. :-) This coming from a guy who, two messages prior, started a sentence with but. But, there's nothing wrong with starting a sentence with but. There, I even started AND ended with one. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Fri, Jul 25, 2008 at 6:29 PM, tedd [EMAIL PROTECTED] wrote: At 1:59 PM -0400 7/25/08, Daniel Brown wrote: On Fri, Jul 25, 2008 at 12:56 PM, tedd [EMAIL PROTECTED] wrote: At 8:10 PM +0100 7/24/08, Richard Heyes wrote: (and anal retentive) when you code :) I am; the problem is no one lives up to my standards... :-) Anyone else find the two sentences above used together disturbing? Something about anal and up that doesn't sound good. :-) This coming from a guy who, two messages prior, started a sentence with but. But, there's nothing wrong with starting a sentence with but. There, I even started AND ended with one. Correct, as I said, in Reader's Digest English. In proper grammar, it's tantamount to ending a sentence with a preposition[1]. However, even in Reader's Digest English (RDE[TM]), heading a word with but is acceptable but following it immediately with a comma is not[2]. 1: Hence the name, pre-position --- positioned before. 2: http://www.michbar.org/journal/pdf/pdf4article628.pdf -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
At 6:47 PM -0400 7/25/08, Daniel Brown wrote: On Fri, Jul 25, 2008 at 6:29 PM, tedd [EMAIL PROTECTED] wrote: But, there's nothing wrong with starting a sentence with but. There, I even started AND ended with one. Correct, as I said, in Reader's Digest English. In proper grammar, it's tantamount to ending a sentence with a preposition[1]. However, even in Reader's Digest English (RDE[TM]), heading a word with but is acceptable but following it immediately with a comma is not[2]. 1: Hence the name, pre-position --- positioned before. 2: http://www.michbar.org/journal/pdf/pdf4article628.pdf As I see it, this is more of a When to use a comma thing than a but thing. I use commas like I talk. For example, I would never say: But that didn't happen. Instead, I would say But -- pause -- that didn't happen. So, I write it: But, that didn't happen. The But and pause is used by me to get someone's attention before presenting my objection. Now, one can argue if my method is proper or not -- but, I don't care. The purpose of writing is to communicate and I do that rather well. I remember three discussions I had with teachers about writing -- one teacher in High School told me that no one intelligent would ever consider anything I had to say because of my obvious limitations. But, I still graduated from High School. Another teacher marked me down from an A to a B in my last year in college because he said that he didn't want me to graduate with honors for I wasn't the proper type of person to represent his college as an honor student. But, I still graduated with honors. The last one claimed that my use of commas was excessive in my MS thesis. But, I still published, defended my thesis, and received my MS. So in the end, these were the things I remember being taught by English teachers. They taught me well -- but, nothing about writing. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On 7/25/08, tedd [EMAIL PROTECTED] wrote: I do it all the time. In fact, I enjoy doing it (no I don't want to do it for anyone else). What I find interesting/entertaining is reducing the amount of code down to what's actually necessary and then reorganizing the code to make routines more optimum and generic. Most of the stuff I review is reduced considerably. In short, it's a great way for me to both learn and build my own library. When clients don't have me pounding keys for their service, I enjoy reviewing, rewriting code and creating demos. However, I would never use a Code beautifier because as I go through the code, the only code that get beautified is the code that I approve. When I see code formatted differently than mine, then I know it's suspect and I need to review it. basically, quote what this guy says - this is me in a nutshell. i can tell my code from others too, so i know if something's been fubared that i've written :) tedd you took the words out of my mouth about the subject. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Fri, Jul 25, 2008 at 10:02 PM, tedd [EMAIL PROTECTED] wrote: [snip=1920's_anecdote] So in the end, these were the things I remember being taught by English teachers. They taught me well -- but, nothing about writing. :-) That's one thing about being a teacher in an official capacity: your students are likely to learn from you, even if it's not what you're trying to teach them. In any case, it sounds like you've met people who prove the rather offensive adage: those who can, do; those who can't, teach. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Code beautifier
Anyone know of an unintrusive code beautifier written specifically with in mind? Thanks. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
Richard Heyes wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? Thanks. Hi, With 'what' in mind? -- Aschwin Wesselius /'What you would like to be done to you, do that to the other'/
Re: [PHP] Code beautifier
Anyone know of an unintrusive code beautifier written specifically with in mind? With 'what' in mind? Sorry, PHP. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
Richard Heyes wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? With 'what' in mind? Sorry, PHP. The only one that I've used and got results with is PEAR PHP_Beautifier. But the PEAR code itself is butt ugly. I'm thinking about rewriting parts of this package for personal use, since it is useful. I just want a quick and dirty straight forward beautifier. The plugins of PHP_Beautifier are nice, so I want to use them too. In combination with CodeSniffer you can first sniff what's wrong and then beautify it. That's my two cents. -- Aschwin Wesselius /'What you would like to be done to you, do that to the other'/
Re: [PHP] Code beautifier
Anyone know of an unintrusive code beautifier written specifically with in mind? I know it's not quite what you are asking, but the IDE I use has a really good code beautifier. It works with a great many languages, not just for PHP. This is on top of a gagillion other really useful features that make coding a lot more fun. http://www.slickedit.com/ thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Thu, Jul 24, 2008 at 8:34 AM, Christoph Boget [EMAIL PROTECTED]wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? I know of what proprietary software that does it very good: polystyle. (As usual, I'm not related to software creator or anything. I just use and like it) Regards, -- Thiago Henrique Pojda
Re: [PHP] Code beautifier
On 7/24/08, Richard Heyes [EMAIL PROTECTED] wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? just be prudent (and anal retentive) when you code :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Thu, Jul 24, 2008 at 3:07 PM, mike [EMAIL PROTECTED] wrote: On 7/24/08, Richard Heyes [EMAIL PROTECTED] wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? just be prudent (and anal retentive) when you code :) That doesn't work when you get code from someone else that wasn't prudent enough ;) (or even removed code indents *sigh*) -- Thiago Henrique Pojda
Re: [PHP] Code beautifier
On Thu, Jul 24, 2008 at 6:15 AM, Richard Heyes [EMAIL PROTECTED] wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? Rich, I thought you WERE the code beautifier. ;-P -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On 7/24/08, Thiago H. Pojda [EMAIL PROTECTED] wrote: That doesn't work when you get code from someone else that wasn't prudent enough ;) I figured that'd be the reply - it's not my code ... sadly, I still go and reformat other coworker's code anyway, heh. Yeah, I'm -that bad- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Thu, Jul 24, 2008 at 3:14 PM, mike [EMAIL PROTECTED] wrote: On 7/24/08, Thiago H. Pojda [EMAIL PROTECTED] wrote: sadly, I still go and reformat other coworker's code anyway, heh. Yeah, I'm -that bad- That's why I looked for a tool like that months ago. Big project from someone else, do you feel like reformatting hundreds of files with hundreds (thousands?) of lines manually? I didn't :) -- Thiago Henrique Pojda
Re: [PHP] Code beautifier
On 24 Jul 2008, at 19:14, mike wrote: On 7/24/08, Thiago H. Pojda [EMAIL PROTECTED] wrote: That doesn't work when you get code from someone else that wasn't prudent enough ;) I figured that'd be the reply - it's not my code ... sadly, I still go and reformat other coworker's code anyway, heh. Yeah, I'm -that bad- 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. IMHO. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On 7/24/08, Thiago H. Pojda [EMAIL PROTECTED] wrote: That's why I looked for a tool like that months ago. Big project from someone else, do you feel like reformatting hundreds of files with hundreds (thousands?) of lines manually? I didn't :) If it's something I will wind up working on, I just do it naturally, it's not even a pain in the ass for me anymore. It also lets me look line by line for ways to improve/optimize, the problem is I do run into a lot of why the hell did they do this? and yes, sometimes I do give up or ignore some code :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On Thu, Jul 24, 2008 at 2:22 PM, Stut [EMAIL PROTECTED] wrote: On 24 Jul 2008, at 19:14, mike wrote: On 7/24/08, Thiago H. Pojda [EMAIL PROTECTED] wrote: That doesn't work when you get code from someone else that wasn't prudent enough ;) I figured that'd be the reply - it's not my code ... sadly, I still go and reformat other coworker's code anyway, heh. Yeah, I'm -that bad- 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. IMHO. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Standard styles are the best to gain that consistency, but a bear to implement. I've developed and implemented on at my work, but ts so hard to enforce when you are not supported by those above you who are also coding. -- Bastien Cat, the other other white meat
Re: [PHP] Code beautifier
On 7/24/08, Stut [EMAIL PROTECTED] 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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On 24 Jul 2008, at 19:31, mike wrote: On 7/24/08, Stut [EMAIL PROTECTED] 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
Re: [PHP] Code beautifier
On 7/24/08, Stut [EMAIL PROTECTED] wrote: 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. 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. 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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
On 24 Jul 2008, at 20:01, mike wrote: On 7/24/08, Stut [EMAIL PROTECTED] wrote: 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. 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. 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. 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. 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. 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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
(and anal retentive) when you code :) I am; the problem is noone lives up to my standards... :-) -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
Hi, Rich, I thought you WERE the code beautifier. ;-P Thanks... There's just so much to do though... :-) -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code beautifier
Richard Heyes wrote: Anyone know of an unintrusive code beautifier written specifically with in mind? Thanks. Hi, I want to narrow down to why I looked into PHP_Beautifier from PEAR. First, it's written in PHP (and uses the PHP tokenizer at it and not some regex wizardry) and so it's not part of some IDE and therefore you don't need to get used to a new environment. Second, you can have all sorts of guidelines and call them however it suits you. You can even set up a guideline for each coworker and one main codestyle. You import the code, run your codestyle guideline on it, make your edits and right before the build, you run the main codestyle configuration. Voila, no harm done and everybody is happy. Third, I wanted it to integrate it into phpUnderControl, so I can run a CodeSniffer and maybe the Beautifier at the end bit of a build cycle if needed, make the documentation, run some unit tests etc. Something you can't do with a IDE Beautifier. The thing is, I can't read some of my coworkers code because they don't use enough white-space. I get a headache at the end of the day because I can't focus enough and have to read each line 3 times. I hate that. People saying white-space takes bytes in the filesize have a point, but the same people indent to much or awkward or use comments all over the place just for the sake of it. If your code has enough white-space and clear indenting guidelines, you sometimes don't need to comment in your code at all. I hate comments. Not only writing them, but especially trying to 'read' around them. The code explains a lot and so has the code to be. Comments only get into my way. Put 'documentation' into a document, not in a script. You can even put PHP-doc in a separate file, run the PHPDocumentor at that file and leave your script alone. I only use PHP_Beautifier to clear up the readability of the code, not to make it look nice (or beauty). If someone has problems with my code having to much white-space, so be it. They can't say it's unreadable, but I can say it about my coworkers code. So, for now I use PHP_Beautifier and not some IDE tool wich meets only half way and misses the point. Aschwin Wesselius -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP code beautifier?
Hi List Does anybody know any good PHP code beautifiers/formaters? Preferably one which is configurable so I can specify the exact format I want. Cheers, Jacob Vennervald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP code beautifier?
Jacob, http://www.tote-taste.de/X-Project/beautify/ http://www.semdesigns.com/Products/Formatters/PHPFormatter.html http://www.trita.com/features/php-beautifier.jsp http://www.bierkandt.org/beautify/ http://www.trita.com/ http://www.beautifier.org/ This should get you started. I think PHPEdit has a code beautifier feature too. Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) Joseph Jacob Vennervald Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi List Does anybody know any good PHP code beautifiers/formaters? Preferably one which is configurable so I can specify the exact format I want. Cheers, Jacob Vennervald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP code beautifier?
Thanks a lot. Jacob Vennervald On Thu, 2003-07-17 at 15:29, Joseph Szobody wrote: Jacob, http://www.tote-taste.de/X-Project/beautify/ http://www.semdesigns.com/Products/Formatters/PHPFormatter.html http://www.trita.com/features/php-beautifier.jsp http://www.bierkandt.org/beautify/ http://www.trita.com/ http://www.beautifier.org/ This should get you started. I think PHPEdit has a code beautifier feature too. Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) Joseph Jacob Vennervald Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi List Does anybody know any good PHP code beautifiers/formaters? Preferably one which is configurable so I can specify the exact format I want. Cheers, Jacob Vennervald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Venlig hilsen / Best regards, Jacob Vennervald System Developer Proventum Solutions ApS Toldbodgade 51C 1253 Copenhagen K Denmark Phone: +45 33 45 43 61 Mobile: +45 61 68 58 51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP code beautifier?
I really think that this depends on the topic. I know that if I'm looking for an editor (esp for a language just starting in), I can search google all day, but end up with a list full of fud. In situations like this, I would prefer to go straight to the source and ask the people who have put most editors for that languange to the test, and sometimes that means I need to post to a mailing list. Now, I''m not saying that you don't have a point (All too often people ask without even trying to find the answer themselves. I sometimes find myself doing this, and it's a shame becuase there is so much information a person misses out on that he/she would not normally be exposed to.), but you have to ask yourself A beginner, or a veteran? Othertimes, I just want to be sure I didn't miss something that would be ideal. I don't know...just my .02. Joseph Szobody wrote: Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP code beautifier?
Actually I did search Google first and I did get the same results you got. But what I was looking for was actually not a list of different beautifiers but comments from developers having experience with a specific beautier that they find does the job well. Jacob Vennervald On Thu, 2003-07-17 at 15:40, John Manko wrote: I really think that this depends on the topic. I know that if I'm looking for an editor (esp for a language just starting in), I can search google all day, but end up with a list full of fud. In situations like this, I would prefer to go straight to the source and ask the people who have put most editors for that languange to the test, and sometimes that means I need to post to a mailing list. Now, I''m not saying that you don't have a point (All too often people ask without even trying to find the answer themselves. I sometimes find myself doing this, and it's a shame becuase there is so much information a person misses out on that he/she would not normally be exposed to.), but you have to ask yourself A beginner, or a veteran? Othertimes, I just want to be sure I didn't miss something that would be ideal. I don't know...just my .02. Joseph Szobody wrote: Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Venlig hilsen / Best regards, Jacob Vennervald System Developer Proventum Solutions ApS Toldbodgade 51C 1253 Copenhagen K Denmark Phone: +45 33 45 43 61 Mobile: +45 61 68 58 51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php code beautifier
What is a code beautifier? -Original Message- From: George Nicolae [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 1:47 AM To: [EMAIL PROTECTED] Subject: [PHP] php code beautifier do you know if exist a php code beautifier for win32? pls tell me the address. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php code beautifier
do you know if exist a php code beautifier for win32? pls tell me the address. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php code beautifier
I'm working php script that would perform such a feat. I'll post news on php.general when/if it's finished. Mike George Nicolae wrote: do you know if exist a php code beautifier for win32? pls tell me the address. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP code beautifier?
Yes, I know it should be written correctly from the beginning. But, in case it isn't: what do you use to format ugly looking scripts? Maciek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]