<?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>Sun, 19 May 2013 06:51:43 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Dagfinn Reiersol's Blog: Don't refactor without unit tests]]></title>
      <guid>http://www.phpdeveloper.org/news/13170</guid>
      <link>http://www.phpdeveloper.org/news/13170</link>
      <description><![CDATA[<p>
In a (sort of) response to some of the refactoring posts that <a href="http://brandonsavage.com">Brandon Savage</a> has been posting, <i>Dagfinn Reiersol</i> has suggested something that should have been done from the start - <a href="http://blog.agilephp.com/2009/09/03/dont-refactor-without-unit-tests/">write unit tests before you refactor</a>.
</p>
<blockquote>
That said, I do have something important to add. The series is missing the first, most basic rule: Don't refactor unless you have good automated test coverage (typically with <a href="http://en.wikipedia.org/wiki/Unit_testing">unit tests</a>). And if there are no test, write them before you start refactoring.
</blockquote>
<p>
He notes that with successful unit tests in place, you can freely change the underlying structure of the application with (almost) no worries that your application will fall apart the next time it's run. He does point out the need for a bit of refactoring before the tests could really be successfully run (since there's a need for an external twitter connection).
</p>]]></description>
      <pubDate>Fri, 04 Sep 2009 13:45:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Peer Review: Managing Coding Standards]]></title>
      <guid>http://www.phpdeveloper.org/news/13052</guid>
      <link>http://www.phpdeveloper.org/news/13052</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> has <a href="http://www.brandonsavage.net/peer-review-managing-coding-standards/">posted a few suggestions</a> about dealing with coding standards and how they can help improve the quality of your code via his refactoring of a bit of <a href="http://www.brandonsavage.net/peer-review-taking-code-and-making-it-better/">example code</a>. This time the focus is on documentation.
</p>
<blockquote>
One of the first things I look for when I check out code is how is the code organized? Is it laid out well? Is it coded to a particular standard? In our code sample, the first thing we should address is how does the code look. There are a number of suggestions I would make immediately.
</blockquote>
<p>His list includes four suggestions for/comments about different areas of <a href="http://www.brandonsavage.net/peer-review-taking-code-and-making-it-better/">his example code</a>:</p>
<ul>
<li>There are no DocBlocks or clear coding standards
<li>Examining The Properties (comments of the class properties)
<li>Conditionals (changing inline to braced)
<li>Improving The Constructor (to make it more flexible)
</ul>]]></description>
      <pubDate>Mon, 17 Aug 2009 10:28:04 -0500</pubDate>
    </item>
  </channel>
</rss>
