Re: How to write code: how wrong am I?

From: Date: Fri, 25 Feb 2011 18:53:14 +0000
Subject: Re: How to write code: how wrong am I?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-311579@lists.php.net to get a copy of this message
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 Blanchard<jblanchard@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.
This is why I use the bracing style I use in PHP. A cursory glance of the code will show you where you've forgotten a brace. Syntax highlighting is also nice. HTML can trip you up with missing or superfluous tags, but a quick run through the W3C validator will catch those errors. Cheers, Rob.
Rob is exactly right on both counts. Place braces on their own lines and use the W3C Validator to check both html and css. Cheers, tedd -- ------- http://sperling.com/

« previous php.general (#311579) next »