Re: [PHP] PHP Standard style of writing your code

2006-05-03 Thread tedd
Problem stated: At 4:54 AM -0500 5/3/06, Richard Lynch wrote: >>I can't really lug a 19" monitor all over, and there's no room in my sound booth for it, what with the amps, sound boards, computer, CD duplicator, etc. Suggestion offered for consideration: > If cost is not an object, consi

Re: [PHP] PHP Standard style of writing your code

2006-05-03 Thread Barry
Richard Lynch schrieb: On Tue, May 2, 2006 4:07 am, Barry wrote: [snip] Barry; I'm sorry, but you screwed up the indentation in the sample with in-line brackets. So, duh, it's unreadable. It's not quite easy to intend in mail clients because that might be they are not suited for coding at a

Re: [PHP] PHP Standard style of writing your code

2006-05-03 Thread Richard Lynch
On Tue, May 2, 2006 8:49 am, tedd wrote: >> > And for your problem with viewing. probably try to get a 19" >> monitor. >>> They are not that expencive anymore.(The CRT ones) >>> Even on 1024x768 you see LOTSA code. >> >>I frequently code on smaller monitors -- laptop, ancient desktop, >>stripped

Re: [PHP] PHP Standard style of writing your code

2006-05-03 Thread Richard Lynch
On Tue, May 2, 2006 4:07 am, Barry wrote: [snip] Barry; I'm sorry, but you screwed up the indentation in the sample with in-line brackets. So, duh, it's unreadable. > I bet you would have problems coding so much nested IFs or such, i did > had them writing that first style above. I haven't had

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Robert Cummings
On Tue, 2006-05-02 at 13:18, John Meyer wrote: > Should we really have this arguement about a "standard" way of writing > the code? This is PHP, an open-source project. Isn't that like asking > existentialists to adopt a uniform code of conduct? Yes but what would that code of conduct look lik

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread John Meyer
Should we really have this arguement about a "standard" way of writing the code? This is PHP, an open-source project. Isn't that like asking existentialists to adopt a uniform code of conduct? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Robert Cummings
On Tue, 2006-05-02 at 11:06, tedd wrote: > Barry: > > >>PS: Barry, you and I use the exact same style -- you must be very > >>intelligent. ;-) > >Or very stupid, depends on who looks at us ^_^" > > > To paraphrase Will Rogers, "We're all stupid, only in different subjects." Speak for yourself

RE: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Robert Cummings
On Tue, 2006-05-02 at 09:03, Ford, Mike wrote: > > As you might have guessed, I *HATE* curly brackets with a vengeance, which is > why I eschew both those styles and use PHP's alternative syntax: > > if (...): > if (...): >// mmh > else: >// oh > endif; > whi

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Robert Cummings
On Tue, 2006-05-02 at 04:02, Barry wrote: > > - I try not to let lines grow larger than about 100 cols (cannot > > be really done with strings and other thingies, and maybe that > > should remain in the old 80 cols, but it's too litle space), and > Never possible if you write web-applications.

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread tedd
Barry: PS: Barry, you and I use the exact same style -- you must be very intelligent. ;-) Or very stupid, depends on who looks at us ^_^" To paraphrase Will Rogers, "We're all stupid, only in different subjects." tedd -- -

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Barry
tedd schrieb: As you might have guessed, I *HATE* curly brackets with a vengeance, which is why I eschew both those styles and use PHP's alternative syntax: And, I *LOVE* curly brackets -- before them we had repeat the opening statement statement in some fashion, such as FOR/NEXT, WHILE/WEND,

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Barry
Ford, Mike schrieb: On 02 May 2006 14:19, Barry wrote: Oh my god -- curly brackets and excessive indentation -- and curly brackets. Just a mo, where did I put my curly-brackets-and-whitespace-glasses? Aaaahhh, that's better!! As you might have guessed, I *HATE* curly brackets with a vengea

RE: [PHP] PHP Standard style of writing your code

2006-05-02 Thread tedd
As you might have guessed, I *HATE* curly brackets with a vengeance, which is why I eschew both those styles and use PHP's alternative syntax: And, I *LOVE* curly brackets -- before them we had repeat the opening statement statement in some fashion, such as FOR/NEXT, WHILE/WEND, IF/END IF. Cu

RE: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Ford, Mike
On 02 May 2006 14:19, Barry wrote: > > Oh my god -- curly brackets and excessive indentation -- > and curly brackets. Just a mo, where did I put my > curly-brackets-and-whitespace-glasses? Aaaahhh, that's better!! > > > > As you might have guessed, I *HATE* curly brackets with a > vengeance, wh

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread tedd
> And for your problem with viewing. probably try to get a 19" monitor. They are not that expencive anymore.(The CRT ones) Even on 1024x768 you see LOTSA code. I frequently code on smaller monitors -- laptop, ancient desktop, stripped-down flat-panel monitor that fits inside a rack-mount 2-R

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Barry
Oh my god -- curly brackets and excessive indentation -- and curly brackets. Just a mo, where did I put my curly-brackets-and-whitespace-glasses? Aaaahhh, that's better!! As you might have guessed, I *HATE* curly brackets with a vengeance, which is why I eschew both those styles and use PH

RE: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Ford, Mike
On 02 May 2006 10:07, Barry wrote: > Richard Lynch schrieb: > > On Tue, May 2, 2006 3:02 am, Barry wrote: > > > Rafael schrieb: > > > > IMHO, vertical aligned brackets can be messy when nesting > > > > relatively-small blocks (and seems to me like a lot of > wasted space) > > > Huh?! > > > Sho

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Barry
Richard Lynch schrieb: On Tue, May 2, 2006 3:02 am, Barry wrote: Rafael schrieb: IMHO, vertical aligned brackets can be messy when nesting relatively-small blocks (and seems to me like a lot of wasted space) Huh?! Show an example. I don't think you will be able to show one. But this wasted

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Richard Lynch
On Tue, May 2, 2006 3:02 am, Barry wrote: > Rafael schrieb: >> IMHO, vertical aligned brackets can be messy when nesting >> relatively-small blocks (and seems to me like a lot of wasted space) > Huh?! > Show an example. I don't think you will be able to show one. > But this wasted space gives y

Re: [PHP] PHP Standard style of writing your code

2006-05-02 Thread Barry
Rafael schrieb: IMHO, vertical aligned brackets can be messy when nesting relatively-small blocks (and seems to me like a lot of wasted space) Huh?! Show an example. I don't think you will be able to show one. But this wasted space gives you a lot more insight into the code when looking for

RE: [PHP] PHP Standard style of writing your code

2006-05-01 Thread Chris W. Parker
Richard Lynch on Saturday, April 29, 2006 12:12 AM said: > Okay, but let's do keep this fairly serious, and let's NOT let it > devolve into the usual religious flame-war this topic gets to... Yeah I should have asked off list as I'm not interested in debating, just

Re: [PHP] PHP Standard style of writing your code

2006-04-30 Thread tedd
Beautiful code often contains fewer bugs. Dante I agree -- but, if nothing else, they're at least prettier bugs. :-) tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Richard Lynch
On Sat, April 29, 2006 10:36 pm, D. Dante Lorenso wrote: > However...you may need to make a policy in your company. If you use > source control for your software, it may see changes in formatting as > a > distinct major revision. Therefore, if you save code in "your" style > and another developer

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Richard Lynch
On Sat, April 29, 2006 6:10 pm, Robert Cummings wrote: > On Sat, 2006-04-29 at 10:56, Satyam wrote: >> >> A brace on its own line doesn't make sense to me. > > This begs the question... Where do you place the closing brace? I think no matter which style one uses, the following statement is correct

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread D. Dante Lorenso
So no matter what was actually typed, *I* would see: function foo ($x) { //body } but some heretic who doesn't know any better would see: function foo($x) { //body } Now *THAT* would be a feature worth paying for in an IDE! :-) Without caring what style you prefer, the correct repl

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Robert Cummings
On Sat, 2006-04-29 at 10:56, Satyam wrote: > > A brace on its own line doesn't make sense to me. This begs the question... Where do you place the closing brace? Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Miles Thompson
At 03:19 AM 4/29/2006, Robert Cummings wrote: On Sat, 2006-04-29 at 02:08, Paul Novitski wrote: > > IMHO, vertical aligned brackets can be messy when nesting > >relatively-small blocks (and seems to me like a lot of wasted space) > > > like a use, not a waste. > > OK, OK, I'll stop. Thi

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Richard Lynch
On Sat, April 29, 2006 9:56 am, Satyam wrote: > The compiler cannot read > indentations. > So, since the brace is for the benefit of the compiler, not mine, I [pedantic] Actually, a compiler could use indentation, and, in fact, compilers for some languages do just that. [/pedantic] That style of

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread tedd
A brace on its own line doesn't make sense to me. Satyam As the old lady said, as she kissed the cow "To each their own." It make perfect sense to me to enclose all blocks of code within braces on their own line AND to indent that entire segment, like so. function, if, while, switch, whatev

RE: [PHP] PHP Standard style of writing your code

2006-04-29 Thread tedd
At 2:12 AM -0500 4/29/06, Richard Lynch wrote: But I'm totally serious here -- I made this decision in college circa 1981, and I wrote the same long program both ways, and hung the two versions up on the wall side-by-side, and I liked the one with { on the same lines better. I even solicited my

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Rafael
Thanks for your reply. Paul Novitski already "talked" with me about it (in private), and my conclusions were... - I guess that has something to do with the way *I* read my mails, since I'm usually aware what people are talking about (since I've wrote the one they're responding, or I've b

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Satyam
On Sat, 2006-04-29 at 03:17, Richard Lynch wrote: I'll also respond to another poster: I personally have no less/more ease in aligning } with a logic statement or with another {, *IF* the code is indented properly. In other words, the vertical alignment is more a function of the indentation, t

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Robert Cummings
On Sat, 2006-04-29 at 03:17, Richard Lynch wrote: > > I'll also respond to another poster: > > I personally have no less/more ease in aligning } with a logic > statement or with another {, *IF* the code is indented properly. > > In other words, the vertical alignment is more a function of the > i

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Porpoise
"Rafael" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] P.S. What, in your mind, is the advantage of replying after quoting the original message and not before? :) In an NG environment, it allows everyone to follow the logic and see clearly what is being replied to, in the corre

Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Richard Lynch
On Sat, April 29, 2006 1:08 am, Paul Novitski wrote: >> IMHO, vertical aligned brackets can be messy when nesting >>relatively-small blocks (and seems to me like a lot of wasted space) > > I'm struggling to get my head around this concept of 'wasted space' > with regard to software code. W

RE: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Richard Lynch
On Fri, April 28, 2006 5:18 pm, Chris W. Parker wrote: > Richard Lynch > on Monday, April 24, 2006 11:50 PM said: > >> So no matter what was actually typed, *I* would see: >> >> function foo ($x) { >> //body >> } >> >> but some heretic who doesn't know any better wo

Re: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Rafael
It's kind of ironic that you didn't split that big chunk of text into paragraphs, don't you think? ;) Anyway, yes, I was referring to visual space, we all know that is more clear the more you can see the code, that's why we don't let rows go insinely long (well, wide actually), and that also

Re: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Robert Cummings
On Sat, 2006-04-29 at 02:08, Paul Novitski wrote: > > IMHO, vertical aligned brackets can be messy when nesting > >relatively-small blocks (and seems to me like a lot of wasted space) > > I'm struggling to get my head around this concept of 'wasted space' > with regard to software code.

Re: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Robert Cummings
On Sat, 2006-04-29 at 01:38, Rafael wrote: > IMHO, vertical aligned brackets can be messy when nesting Explain messy!? > relatively-small blocks (and seems to me like a lot of wasted space) Did you just say wasted space? I mean it's not like 99.9% (pulled from the dark recesses of my behin

Re: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Paul Novitski
IMHO, vertical aligned brackets can be messy when nesting relatively-small blocks (and seems to me like a lot of wasted space) I'm struggling to get my head around this concept of 'wasted space' with regard to software code. What is it that's getting wasted, exactly? If we printed

Re: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Rafael
IMHO, vertical aligned brackets can be messy when nesting relatively-small blocks (and seems to me like a lot of wasted space) A couple of facts of my codding style: - I tend to always use brakets, so I ignore the fact that single lines/actions can be written without brackets, - I try no

RE: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Robert Cummings
On Fri, 2006-04-28 at 18:18, Chris W. Parker wrote: > Richard Lynch > on Monday, April 24, 2006 11:50 PM said: > > > So no matter what was actually typed, *I* would see: > > > > function foo ($x) { > > //body > > } > > > > but some heretic who doesn't know any be

RE: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Chris W. Parker
Richard Lynch on Monday, April 24, 2006 11:50 PM said: > So no matter what was actually typed, *I* would see: > > function foo ($x) { > //body > } > > but some heretic who doesn't know any better would see: > function foo($x) > { > //body > } > > Now *THAT* wo

Re: [PHP] PHP Standard style of writing your code

2006-04-25 Thread Ahmed Saad
On 4/25/06, Richard Lynch <[EMAIL PROTECTED]> wrote: > Now *THAT* would be a feature worth paying for in an IDE! :-) Well, you actually don't have to pay anything. TruStudion PHP foundation version (read free/open source version) has a decent code formatter and a pretty neat editor: argument orde

Re: [PHP] PHP Standard style of writing your code

2006-04-25 Thread tedd
Hmmm. It would be Really Nifty if some fancy IDE out there would automatically render one's PHP code in the style preferred by the developer... So no matter what was actually typed, *I* would see: function foo ($x) { //body } but some heretic who doesn't know any better would see: function f

Re: [PHP] PHP Standard style of writing your code

2006-04-25 Thread Satyam
- Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> On Tue, April 25, 2006 12:51 am, Martin Zvarík wrote: I see everyone has its own way of writing the code. If there is 10 programmers working on same thing, it would be good if they would have same style of writing the

Re: [PHP] PHP Standard style of writing your code

2006-04-25 Thread T.Lensselink
> Hi, > I see everyone has its own way of writing the code. If there is 10 > programmers working on same thing, it would be good if they would have > same style of writing the PHP code. > > So, my question is: Is there anything what would define standard style > of writing PHP code? > > Thanks,

Re: [PHP] PHP Standard style of writing your code

2006-04-25 Thread Dave Goodchild
Chcek out the PEAR site for a pretty good style, but then again it is a matter of preference and I code any way I choose unless I am working within a team where some kind of consistency makes sense. On 25/04/06, Martin Zvarík <[EMAIL PROTECTED]> wrote: > > Hi, > I see everyone has its own way

Re: [PHP] PHP Standard style of writing your code

2006-04-24 Thread Richard Lynch
On Tue, April 25, 2006 12:51 am, Martin Zvarík wrote: > I see everyone has its own way of writing the code. If there is 10 > programmers working on same thing, it would be good if they would have > same style of writing the PHP code. > > So, my question is: Is there anything what would define s

RE: [PHP] PHP Standard style of writing your code

2006-04-24 Thread Nicolas Verhaeghe
From: Martin Zvarík [mailto:[EMAIL PROTECTED] Sent: Monday, April 24, 2006 10:51 PM To: PHP Subject: [PHP] PHP Standard style of writing your code Hi, I see everyone has its own way of writing the code. If there is 10 programmers working on same thing, it would be good if they would have s