<?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"
	>
<channel>
	<title>Comments on: 10 more tips to make your PHP application scream - Part 2 of N</title>
	<atom:link href="http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/</link>
	<description>A blog about killer code</description>
	<pubDate>Thu, 28 Aug 2008 02:35:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: jaisen</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-43</link>
		<dc:creator>jaisen</dc:creator>
		<pubDate>Mon, 03 Mar 2008 19:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-43</guid>
		<description>@Chad - You bring up a good point.  I hadn't thought about including an article in the series which talks about writing easy to read/maintainable code - which in some cases conflicts with some of these suggestions.  For a PHP application to scale it needs to be easy to follow the code for current and new developers.  That's often overlooked and time IS money - I'll work that into the series.

I should add a note to the beginning of each article which explicitly states to not blindly follow any tips mentioned below - but rather assess the pros and cons of each and implement accordingly.

Additionally, I'm a huge proponent of Agile development and not over engineering early in the development process.  Generally...bottlenecks are best addressed once they begin to creep up.  With easily managed code addressing them should be quick.</description>
		<content:encoded><![CDATA[<p>@Chad - You bring up a good point.  I hadn&#8217;t thought about including an article in the series which talks about writing easy to read/maintainable code - which in some cases conflicts with some of these suggestions.  For a PHP application to scale it needs to be easy to follow the code for current and new developers.  That&#8217;s often overlooked and time IS money - I&#8217;ll work that into the series.</p>
<p>I should add a note to the beginning of each article which explicitly states to not blindly follow any tips mentioned below - but rather assess the pros and cons of each and implement accordingly.</p>
<p>Additionally, I&#8217;m a huge proponent of Agile development and not over engineering early in the development process.  Generally&#8230;bottlenecks are best addressed once they begin to creep up.  With easily managed code addressing them should be quick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-42</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Mon, 03 Mar 2008 19:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-42</guid>
		<description>Oh, well I just read your front page and see you develop for Yahoo! I guess your apps are guaranteed to need scale, which changes things substantially.

But for the average joe, like me, don't worry about scale until you need to. Chances are your won't.</description>
		<content:encoded><![CDATA[<p>Oh, well I just read your front page and see you develop for Yahoo! I guess your apps are guaranteed to need scale, which changes things substantially.</p>
<p>But for the average joe, like me, don&#8217;t worry about scale until you need to. Chances are your won&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-41</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Mon, 03 Mar 2008 19:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-41</guid>
		<description>I totally agree that these tips are best practices if not great performance boosters.

However, to me it's more about going forward with a uniform practice that increases readability, performance, and reduces the need for refactoring.

I don't see going backwards for these gains. Let's take wordpress, which has some pretty ugly source code and refactor it. That would take several man-hour days just to read through all of the source code, plus fixing the code. In the end, you maybe save a few tenths/hundredths of a second and you would have been better off investing your money (since time=money) in another server, bigger VPS, etc.

It's kind of the Rails mantra, keep throwing  machines at the problem until it become worth your time to fix. Most applications never need this scale, but it's good practice   to use going forward.</description>
		<content:encoded><![CDATA[<p>I totally agree that these tips are best practices if not great performance boosters.</p>
<p>However, to me it&#8217;s more about going forward with a uniform practice that increases readability, performance, and reduces the need for refactoring.</p>
<p>I don&#8217;t see going backwards for these gains. Let&#8217;s take wordpress, which has some pretty ugly source code and refactor it. That would take several man-hour days just to read through all of the source code, plus fixing the code. In the end, you maybe save a few tenths/hundredths of a second and you would have been better off investing your money (since time=money) in another server, bigger VPS, etc.</p>
<p>It&#8217;s kind of the Rails mantra, keep throwing  machines at the problem until it become worth your time to fix. Most applications never need this scale, but it&#8217;s good practice   to use going forward.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaisen</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-40</link>
		<dc:creator>jaisen</dc:creator>
		<pubDate>Mon, 03 Mar 2008 09:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-40</guid>
		<description>@Chad, Thanks for writing the benchmarking script.  I've updated the post to include them in the "resources".

I agree with you that the performance gains are slight.  While it's rare that site will see the benefit of this it's good to write code knowing what PHP is doing under the hood.  Minimizing function calls, bypassing the regular expression engine and ordering conditional statements is just good programming practice.

It would be a waste of time to refactor an entire application using these principles.  There's almost always more bang for your buck elsewhere.  Generally at the database...which will be it's own part in this series.

It's important to remember that PHP alone doesn't make a site fast or scale..it's a combination of several things --- which is what I hope to touch on in this series.</description>
		<content:encoded><![CDATA[<p>@Chad, Thanks for writing the benchmarking script.  I&#8217;ve updated the post to include them in the &#8220;resources&#8221;.</p>
<p>I agree with you that the performance gains are slight.  While it&#8217;s rare that site will see the benefit of this it&#8217;s good to write code knowing what PHP is doing under the hood.  Minimizing function calls, bypassing the regular expression engine and ordering conditional statements is just good programming practice.</p>
<p>It would be a waste of time to refactor an entire application using these principles.  There&#8217;s almost always more bang for your buck elsewhere.  Generally at the database&#8230;which will be it&#8217;s own part in this series.</p>
<p>It&#8217;s important to remember that PHP alone doesn&#8217;t make a site fast or scale..it&#8217;s a combination of several things &#8212; which is what I hope to touch on in this series.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-39</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Mon, 03 Mar 2008 07:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-39</guid>
		<description>I wrote a benchmarking script, the results are extremely negligible for most purposes.

It's on my blog..
http://conductr.com/</description>
		<content:encoded><![CDATA[<p>I wrote a benchmarking script, the results are extremely negligible for most purposes.</p>
<p>It&#8217;s on my blog..<br />
<a href="http://conductr.com/" rel="nofollow">http://conductr.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaisen</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-33</link>
		<dc:creator>jaisen</dc:creator>
		<pubDate>Sat, 01 Mar 2008 17:58:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-33</guid>
		<description>@Kevin, Good point. I added a note about that and changed my example.</description>
		<content:encoded><![CDATA[<p>@Kevin, Good point. I added a note about that and changed my example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaisen</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-32</link>
		<dc:creator>jaisen</dc:creator>
		<pubDate>Sat, 01 Mar 2008 17:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-32</guid>
		<description>@Amit, Thanks for the note.  I made an update to the post noting what you said.</description>
		<content:encoded><![CDATA[<p>@Amit, Thanks for the note.  I made an update to the post noting what you said.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-31</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sat, 01 Mar 2008 14:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-31</guid>
		<description>Using {} to access a string as an array is deprecated as of PHP 6.  Since it is an array it makes more sense to use the [] anyway.  $string[3]</description>
		<content:encoded><![CDATA[<p>Using {} to access a string as an array is deprecated as of PHP 6.  Since it is an array it makes more sense to use the [] anyway.  $string[3]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-30</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sat, 01 Mar 2008 14:45:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-30</guid>
		<description>Another thing to note is that you have to use the double quote if you want to use an escape sequence, such as \n.  You can still have your performance gain by mixing quotes: 'Hello, my name is ' . $name . "\n"</description>
		<content:encoded><![CDATA[<p>Another thing to note is that you have to use the double quote if you want to use an escape sequence, such as \n.  You can still have your performance gain by mixing quotes: &#8216;Hello, my name is &#8216; . $name . &#8220;\n&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-29</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sat, 01 Mar 2008 14:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaisenmathai.com/blog/2008/02/29/10-tips-to-make-your-php-application-scream-part-2-of-n/#comment-29</guid>
		<description>I'd like to see some actual benchmark tests you've run with results graphed accordingly to show just how much faster each tweak is and when it is beneficial to use it and not really worth it.</description>
		<content:encoded><![CDATA[<p>I&#8217;d like to see some actual benchmark tests you&#8217;ve run with results graphed accordingly to show just how much faster each tweak is and when it is beneficial to use it and not really worth it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
