Re: [PHP] How to write code: how wrong am I?

2011-02-25 Thread tedd
At 9:13 AM -0500 2/22/11, Robert Cummings wrote: On 11-02-22 08:58 AM, Dotan Cohen wrote: On Tue, Feb 22, 2011 at 14:11, Jay Blanchardjblanch...@pocket.com wrote: It is an interesting concept Dotan, what is the goal? Who is the page targeted to? The goal is to have every open and close

Re: [PHP] How to write code: how wrong am I?

2011-02-25 Thread tedd
At 11:04 AM -0700 2/22/11, Alexis wrote: On 22/02/11 09:40, Dotan Cohen wrote: On Tue, Feb 22, 2011 at 16:15, Robert Cummingsrob...@interjinn.com wrote: If you switch to vertically aligned braces you will have an easier time matching up open and close braces... if (something) { // Code

Re: [PHP] How to write code: how wrong am I?

2011-02-23 Thread Tamara Temple
On Feb 22, 2011, at 5:29 AM, Dotan Cohen wrote: I wrote a short page on how to actually type of code that one writes, it can be found here: http://dotancohen.com/howto/write_code.html The point that I stress on the page is that first you close an element, then you fill it's contents. The page

Re: [PHP] How to write code: how wrong am I?

2011-02-23 Thread Dotan Cohen
On Tue, Feb 22, 2011 at 19:03, Paul M Foster pa...@quillandmouse.com wrote: Not a bad idea for HTML, not so great for PHP. Some of what you're trying to solve/avoid can be handled by a decent editor, one that does syntax highlighting and/or does brace and parenthesis checking. It doesn't

RE: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Jay Blanchard
[snip] The point that I stress on the page is that first you close an element, then you fill it's contents. The page has examples in HTML and PHP. I would like to know what the experienced programmers here think about this. Am I going about it wrong? [/snip] It is an interesting concept Dotan,

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Marc Guay
It's an interesting idea (a different take on coding best practices) but I find the PHP example to be laborious and time consuming with little benefit. If I'm typing an IF statement, I hope to god I know what the condition is before I start typing it. Creating the if/else structure first and

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Robert Cummings
On 11-02-22 06:29 AM, Dotan Cohen wrote: I wrote a short page on how to actually type of code that one writes, it can be found here: http://dotancohen.com/howto/write_code.html The point that I stress on the page is that first you close an element, then you fill it's contents. The page has

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Andy McKenzie
On Tue, Feb 22, 2011 at 6:29 AM, Dotan Cohen dotanco...@gmail.com wrote: I wrote a short page on how to actually type of code that one writes, it can be found here: http://dotancohen.com/howto/write_code.html The point that I stress on the page is that first you close an element, then you

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
On Tue, Feb 22, 2011 at 14:11, Jay Blanchard jblanch...@pocket.com wrote: It is an interesting concept Dotan, what is the goal? Who is the page targeted to? The goal is to have every open and close bracket matched, and not have to worry about what is still open. The page was specifically

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
On Tue, Feb 22, 2011 at 15:00, Andy McKenzie amckenz...@gmail.com wrote: I'll be the first to tell you that I'm not a great programmer, so my take may not be worth a lot.  However, this is pretty close to how I write.  Not exactly, but close.  I also always label open and closing brackets on

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Robert Cummings
On 11-02-22 08:58 AM, Dotan Cohen wrote: On Tue, Feb 22, 2011 at 14:11, Jay Blanchardjblanch...@pocket.com wrote: It is an interesting concept Dotan, what is the goal? Who is the page targeted to? The goal is to have every open and close bracket matched, and not have to worry about what is

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Robert Cummings
On 11-02-22 09:06 AM, Dotan Cohen wrote: On Tue, Feb 22, 2011 at 14:58, Robert Cummingsrob...@interjinn.com wrote: I'm more likely to do this stuff for HTML than PHP. However, I do sometimes lay out the structure of some conditionals/functions before fleshing them out so that I can do some

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
On Tue, Feb 22, 2011 at 14:15, Marc Guay marc.g...@gmail.com wrote: It's an interesting idea (a different take on coding best practices) but I find the PHP example to be laborious and time consuming with little benefit.  If I'm typing an IF statement, I hope to god I know what the condition is

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
On Tue, Feb 22, 2011 at 14:58, Robert Cummings rob...@interjinn.com wrote: I'm more likely to do this stuff for HTML than PHP. However, I do sometimes lay out the structure of some conditionals/functions before fleshing them out so that I can do some early testing... but I always fill the

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread la...@garfieldtech.com
On 2/22/11 12:04 PM, Alexis wrote: On 22/02/11 09:40, Dotan Cohen wrote: On Tue, Feb 22, 2011 at 16:15, Robert Cummingsrob...@interjinn.com wrote: If you switch to vertically aligned braces you will have an easier time matching up open and close braces... if (something) { // Code here }