<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>/dev/null &#187; Golem</title>
	<atom:link href="http://www.nulldevice.de/tag/golem/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nulldevice.de</link>
	<description>Static is evil.</description>
	<lastBuildDate>Fri, 18 Nov 2011 17:28:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>ZendCon: Best Practices</title>
		<link>http://www.nulldevice.de/2008/09/zendcon-best-practices/</link>
		<comments>http://www.nulldevice.de/2008/09/zendcon-best-practices/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 17:19:43 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Golem]]></category>
		<category><![CDATA[ZendCon2008]]></category>

		<guid isPermaLink="false">http://www.nulldevice.de/?p=882</guid>
		<description><![CDATA[I found three useful ideas in the PHP Developer Best Practices tutorial by Matthew Weier O&#8217;Phinney (Zend Technologies, Ltd.), Mike Naberezny (Maintainable Software): Add something like PHP_CodeSniffer to pre-commit in Subversion to reject code that doesn&#8217;t follow standards Run tests in a Subversion post-commit script Try to switch to git, because you can also do [...]]]></description>
			<content:encoded><![CDATA[<p>I found three useful ideas in the <span class="summary"><a class="url uid" href="http://www.zendcon.com/ZendCon08/public/schedule/detail/95">PHP Developer Best Practices</a></span> tutorial by<span class="description"> Matthew Weier O&#8217;Phinney (Zend Technologies, Ltd.), Mike Naberezny (Maintainable Software):</span></p>
<ul>
<li>Add something like PHP_CodeSniffer to pre-commit in Subversion to reject code that doesn&#8217;t follow standards</li>
<li>Run tests in a Subversion post-commit script</li>
<li>Try to switch to git, because you can also do commits when offline</li>
</ul>
<p>Sadly, there were also less good ideas like</p>
<ul>
<li>Prefix private/protected class methods and properties with an underscore (makes refactoring very difficult; instead you should start with all properties being protected anyway and only make properties public, that need to be public)</li>
<li>Limit line length to 85 chars (120 chars are ok &#8211; nobody uses a 80 char text console for coding anymore &#8211; wide screens are standard, even for developers)</li>
<li>Use PHP_CodeSniffer (I like ZendCodeAnalyzer)</li>
</ul>
<p>Look at this, if you wanna see bad practices:</p>
<p><a href="http://www.nulldevice.de/wp-content/uploads/2008/09/bad-practices.png"><img class="alignnone size-medium wp-image-883" title="Golem.de: PHP Bad Practices" src="http://www.nulldevice.de/wp-content/uploads/2008/09/bad-practices-500x319.png" alt="" width="500" height="319" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nulldevice.de/2008/09/zendcon-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

