<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 20 May 2013 16:34:25 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Tim Koschuetzki's Blog: Composing Methods: Substitute Algorithmn]]></title>
      <guid>http://www.phpdeveloper.org/news/8463</guid>
      <link>http://www.phpdeveloper.org/news/8463</link>
      <description><![CDATA[<p>
<i>Tim Koschuetzki</i> has another in his "Composing Methods" series posted today - <a href="http://php-coding-practices.com/refactoring/composing-methods/composing-methods-substitute-algorithmn/">this one</a> taking a look at something called the "substitute algorithm". It's a method of replacing content in a simpler way than using multiple ifs (as replaced by array functions).
</p>
<blockquote>
Programming is such a dynamic action that you often find yourself having to replace an algorithmn all together. It will be much easier to do if the current algorithmn is an easy one already. [...] Make sure you decompose your algorithmns as much as you can and use many small methods for it.
</blockquote>
<p>
His example replaces multiple if statements to search through an array with a simple in_array statement, returning the selected array index from there.
</p>]]></description>
      <pubDate>Thu, 16 Aug 2007 08:26:00 -0500</pubDate>
    </item>
  </channel>
</rss>
