<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP Coding Standards</title>
	<atom:link href="http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<lastBuildDate>Sun, 14 Mar 2010 11:08:56 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jesus Lingo</title>
		<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-84812</link>
		<dc:creator>Jesus Lingo</dc:creator>
		<pubDate>Tue, 22 Dec 2009 21:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-84812</guid>
		<description>At Long Last, an issue that I am passionate about. I have looked for information of this topic for the last several hours. Your site is greatly treasured.</description>
		<content:encoded><![CDATA[<p>At Long Last, an issue that I am passionate about. I have looked for information of this topic for the last several hours. Your site is greatly treasured.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: techfounder &#187; The Advancing PHP Developer Part 1: Coding Standards</title>
		<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-83807</link>
		<dc:creator>techfounder &#187; The Advancing PHP Developer Part 1: Coding Standards</dc:creator>
		<pubDate>Sun, 25 May 2008 04:06:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-83807</guid>
		<description>[...] reference material: Wikiepedia - Programming Style PEAR coding standards Professional PHP blog on coding standards A list of coding style [...]</description>
		<content:encoded><![CDATA[<p>[...] reference material: Wikiepedia &#8211; Programming Style PEAR coding standards Professional PHP blog on coding standards A list of coding style [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack Johnson</title>
		<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-81386</link>
		<dc:creator>Jack Johnson</dc:creator>
		<pubDate>Fri, 13 Apr 2007 16:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-81386</guid>
		<description>Problem for me is as well, that my fellow colleagues don&#039;t like coding standards or coding practices like written about here or on http://php-coding-practices.com

I still find coding standards to be a very good idea. 

I fully second Ignatius.</description>
		<content:encoded><![CDATA[<p>Problem for me is as well, that my fellow colleagues don&#8217;t like coding standards or coding practices like written about here or on <a href="http://php-coding-practices.com" rel="nofollow">http://php-coding-practices.com</a></p>
<p>I still find coding standards to be a very good idea. </p>
<p>I fully second Ignatius.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ignatius</title>
		<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-229</link>
		<dc:creator>Ignatius</dc:creator>
		<pubDate>Wed, 06 Oct 2004 01:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-229</guid>
		<description>I think most people miss the point regarding standards in general; i.e. to improve readability and therefore the ability to maintain code.</description>
		<content:encoded><![CDATA[<p>I think most people miss the point regarding standards in general; i.e. to improve readability and therefore the ability to maintain code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew</title>
		<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-219</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Fri, 24 Sep 2004 23:00:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-219</guid>
		<description>I agree with most of your post; coding standards can be a huge benefit when it comes to programmer efficiency as the code formatting itself can lend context to the code.

In particular, I appreciate your comments about the PEAR standards. I have been adopting them for my own use and at work, and I find that by following a standard -- any standard -- I improve my own efficiency. Since PEAR is a published standard, it only makes sense to use that instead of haphazardly developing my own.

I have to disagree with two of your comments. The exceptions you have to the PEAR standards were:
&lt;blockquote&gt;
    &lt;ol&gt;
        &lt;li&gt;aligning equal signs should be discouraged&lt;/li&gt;
        &lt;li&gt;The braces policy for functions should match that of control structures&lt;/li&gt;
        &lt;li&gt;embedding inheritance heirarchy into the class name is bad&lt;/li&gt;
    &lt;/ol&gt;
&lt;/blockquote&gt;

I agree with point 2 completely; it irks me that the standards define the same situation differently based on context. Either put all open curly braces on their own line, or don&#039;t. (I use VIM, and the former is actually more efficient in that editor when bouncing through it.)

However, I disagree with your other points, precisely for reasons you outlined yourself. 

In point 1, I find that aligning equal signs provides a more efficient way of scanning through code -- it&#039;s easier to determine what variables are getting set to what values because I don&#039;t have to determine where the equal sign is -- all equal signs are in the same place. In addition, when editing, it becomes trivial to select a block including the variable names and equal signs in order to transform that block (for instance, to create an array of values instead of many variable assignations). (Those familiar with VIM and its visual blocks will know what I&#039;m speaking about.)

In point 3, again, I find that naming classes as PEAR suggests is efficient -- I can tell from the class name where in the directory hierarchy to find the class&#039; file. It also makes it easy to build __autoload() functions that utilize the classname to find the file containing the class -- change underscores to directory separators, and you&#039;re done.

As this post testifies -- there can be many reasons to adopt one standard over another, and debate will continue after the standard is set. However, the real debate is more a matter of determining what standard you &lt;em&gt;will&lt;/em&gt; use than debating all the points about them. I would certainly favor changing how opening curly braces are done in PEAR -- but unless the PEAR standards change, I&#039;ll do as they outline so that I&#039;m &lt;em&gt;following&lt;/em&gt; a known standard -- which will make my coding style predictable to other programmers -- and hopefully help them be more efficient when modifying my code.</description>
		<content:encoded><![CDATA[<p>I agree with most of your post; coding standards can be a huge benefit when it comes to programmer efficiency as the code formatting itself can lend context to the code.</p>
<p>In particular, I appreciate your comments about the PEAR standards. I have been adopting them for my own use and at work, and I find that by following a standard &#8212; any standard &#8212; I improve my own efficiency. Since PEAR is a published standard, it only makes sense to use that instead of haphazardly developing my own.</p>
<p>I have to disagree with two of your comments. The exceptions you have to the PEAR standards were:</p>
<blockquote>
<ol>
<li>aligning equal signs should be discouraged</li>
<li>The braces policy for functions should match that of control structures</li>
<li>embedding inheritance heirarchy into the class name is bad</li>
</ol>
</blockquote>
<p>I agree with point 2 completely; it irks me that the standards define the same situation differently based on context. Either put all open curly braces on their own line, or don&#8217;t. (I use VIM, and the former is actually more efficient in that editor when bouncing through it.)</p>
<p>However, I disagree with your other points, precisely for reasons you outlined yourself. </p>
<p>In point 1, I find that aligning equal signs provides a more efficient way of scanning through code &#8212; it&#8217;s easier to determine what variables are getting set to what values because I don&#8217;t have to determine where the equal sign is &#8212; all equal signs are in the same place. In addition, when editing, it becomes trivial to select a block including the variable names and equal signs in order to transform that block (for instance, to create an array of values instead of many variable assignations). (Those familiar with VIM and its visual blocks will know what I&#8217;m speaking about.)</p>
<p>In point 3, again, I find that naming classes as PEAR suggests is efficient &#8212; I can tell from the class name where in the directory hierarchy to find the class&#8217; file. It also makes it easy to build __autoload() functions that utilize the classname to find the file containing the class &#8212; change underscores to directory separators, and you&#8217;re done.</p>
<p>As this post testifies &#8212; there can be many reasons to adopt one standard over another, and debate will continue after the standard is set. However, the real debate is more a matter of determining what standard you <em>will</em> use than debating all the points about them. I would certainly favor changing how opening curly braces are done in PEAR &#8212; but unless the PEAR standards change, I&#8217;ll do as they outline so that I&#8217;m <em>following</em> a known standard &#8212; which will make my coding style predictable to other programmers &#8212; and hopefully help them be more efficient when modifying my code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Thompson</title>
		<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-218</link>
		<dc:creator>Christopher Thompson</dc:creator>
		<pubDate>Fri, 24 Sep 2004 20:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-218</guid>
		<description>I find the horribly counter-productive result of discussions about coding style is that they focus on trivial differences and ignoring the 99% agreement. Note that your two cents were:

- aligning equal signs should be discouraged.
- The braces policy for functions should match that of control structures
- embedding inheritance heirarchy into the class name is bad

Quite honestly, those differences would not even matter in the one area where coding standards really matter -- development teams. I don&#039;t know many teams whose productivity was effected by aligned equal sign confusion. 

You and Paul both have an impact on the PHP community. I wish you would spend your time presenting and debating the best ways to implement data abstraction, or front/page controllers, or templating, or MVC, or authentication/access control, or etc. rather than this stuff.</description>
		<content:encoded><![CDATA[<p>I find the horribly counter-productive result of discussions about coding style is that they focus on trivial differences and ignoring the 99% agreement. Note that your two cents were:</p>
<p>- aligning equal signs should be discouraged.<br />
- The braces policy for functions should match that of control structures<br />
- embedding inheritance heirarchy into the class name is bad</p>
<p>Quite honestly, those differences would not even matter in the one area where coding standards really matter &#8212; development teams. I don&#8217;t know many teams whose productivity was effected by aligned equal sign confusion. </p>
<p>You and Paul both have an impact on the PHP community. I wish you would spend your time presenting and debating the best ways to implement data abstraction, or front/page controllers, or templating, or MVC, or authentication/access control, or etc. rather than this stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul M Jones</title>
		<link>http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-217</link>
		<dc:creator>Paul M Jones</dc:creator>
		<pubDate>Fri, 24 Sep 2004 20:04:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/09/24/php-coding-standards/#comment-217</guid>
		<description>How dare you disagree!  It&#039;s obvious that my style is better than your style!

;-)

Not to feed the flame which I&#039;m trying to extinguish (i.e., style wars) ... but who says that, for example, &quot;saving keystrokes&quot; is a useful criterion?  If that were the case, all variables should be named with the absolute fewest characters.  This is getting into the area of &quot;philosphical difference&quot; -- one can choose the means by which to judge the style (fewer characters, greater descriptive verbosity, whatever) and pronounce that Style A is &quot;better&quot; than Style B ... but that&#039;s only according to the criteria you set up.  Nobody agrees on an &quot;objective&quot; standard which stands somehow &quot;outside&quot; personal preference, simply because style is itself personal preference.  In the broad outlines we can agree on goals (readability, consistency, maintainability) but those are equally good for each defined style, provided you are familiar with the style.

My point, and I think we agree (as you note above) that it&#039;s better to pick a defined style and adhere to it than to nurse your own style.  This is not becaase one style is objectively &quot;better&quot; than another (because that&#039;s a matter of preference), but because the social effects of having common styles is more effective in distributing workload.

Hope that clarifies what I meant by &quot;objective&quot; ... maybe that&#039;s not the right word for my meaning.  Thanks.  :-)</description>
		<content:encoded><![CDATA[<p>How dare you disagree!  It&#8217;s obvious that my style is better than your style!</p>
<p> <img src='http://www.procata.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Not to feed the flame which I&#8217;m trying to extinguish (i.e., style wars) &#8230; but who says that, for example, &#8220;saving keystrokes&#8221; is a useful criterion?  If that were the case, all variables should be named with the absolute fewest characters.  This is getting into the area of &#8220;philosphical difference&#8221; &#8212; one can choose the means by which to judge the style (fewer characters, greater descriptive verbosity, whatever) and pronounce that Style A is &#8220;better&#8221; than Style B &#8230; but that&#8217;s only according to the criteria you set up.  Nobody agrees on an &#8220;objective&#8221; standard which stands somehow &#8220;outside&#8221; personal preference, simply because style is itself personal preference.  In the broad outlines we can agree on goals (readability, consistency, maintainability) but those are equally good for each defined style, provided you are familiar with the style.</p>
<p>My point, and I think we agree (as you note above) that it&#8217;s better to pick a defined style and adhere to it than to nurse your own style.  This is not becaase one style is objectively &#8220;better&#8221; than another (because that&#8217;s a matter of preference), but because the social effects of having common styles is more effective in distributing workload.</p>
<p>Hope that clarifies what I meant by &#8220;objective&#8221; &#8230; maybe that&#8217;s not the right word for my meaning.  Thanks.  <img src='http://www.procata.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
