<?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>Fri, 24 May 2013 21:14:49 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Andrew Podner: NPATH Complexity Demystified]]></title>
      <guid>http://www.phpdeveloper.org/news/18745</guid>
      <link>http://www.phpdeveloper.org/news/18745</link>
      <description><![CDATA[<p>
In <a href="http://unassumingphp.com/npath-complexity-demystified/">a new post to his site</a> today <i>Andrew Podner</i> takes a look at NPATH and tries to "demystify" some of the concepts around it.
</p>
<blockquote>
"NPATH, which counts the acyclic execution paths through a function, is an objective measure of software complexity related to the ease with which software can be comprehensively tested."[1]  This is the definition from an article written in 1988 by Brian Nejmeh.  As informative as this is, my eyes glazed over half way into it. So what the heck is acyclic execution anyway? 
</blockquote>
<p>
He defines the term in a bit easier to understand language and includes an example function to help illustrate how NPATH is measured. 
</p>
<blockquote>
The goal is to limit your NPATH complexity in a given method down to 200 or less. [...] As with other complexity metrics, this one can be checked with <a href=""http://phpmd.org/">PHP Mess Detector</a> (phpmd).  The importance of staying under the 200 path threshold is realized when you develop tests and start trying to debug.
</blockquote>]]></description>
      <pubDate>Wed, 14 Nov 2012 10:55:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Source Code Signatures in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17115</guid>
      <link>http://www.phpdeveloper.org/news/17115</link>
      <description><![CDATA[<p>
In <a href="http://www.codediesel.com/php/source-code-signatures-in-php/">this new post</a> to his blog <i>Sameer Borate</i> applies an interesting method of discovery of structure in unfamiliar code - <a href="http://c2.com/doc/SignatureSurvey/">generating code signatures</a>.
</p>
<blockquote>
One method [Ward Cunningham] suggests is that of summarizing on a single line select punctuation characters from each source file. He calls this the file's "signature". This will help the developer gauge the complexity of the code base.
</blockquote>
<p>
He includes a few examples from files in WordPress - looking for the structure of curly braces and semicolons as delimiters for chunks of functionality. Included are a few lines of code to help you generate a signature from any file and an example of a result. It's an interesting idea, but I'm not sure how practical it is. It could be a helpful reference for how complicated the file is, though.
</p>]]></description>
      <pubDate>Thu, 10 Nov 2011 13:11:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Freek Lijten's Blog: Expressing algorithm complexity: the big O notation explained]]></title>
      <guid>http://www.phpdeveloper.org/news/16675</guid>
      <link>http://www.phpdeveloper.org/news/16675</link>
      <description><![CDATA[<p>
<i>Freek Lijten</i> has put together a new post to his blog looking at a method for showing how complex an algorithm is without having to get too deep into how it works - <a href="http://www.freeklijten.nl/home/2011/08/04/Expressing-algorithm-complexity-the-big-O-notation-explained">the big O notation</a> (with examples written in PHP).
</p>
<blockquote>
I'd like to share a topic today which was re-introduced to me by a  <A href="http://en.wikipedia.org/wiki/Lightning_talk">lightningtalk</a> of a colleague of mine. His talk was on the "big O notation". The big O notation is a tool you can use to express the order of complexity of an algorithm. It is useful because it lets you express the order of complexity of an algorithm without taking a lot of time profiling or researching the underlying algorithm. In other words: it gives you a quick way to gain an understanding of what might be wrong (or right) with a specific algorithm. 
</blockquote>
<p>
He introduces the notation as the result of a series of steps needed to solve a problem (ex. 2+2 is less complex than 2+2+2). He illustrates with PHP examples that show adding complexity to a class, adding sets of numbers, looping to find needles in haystacks and finding duplicates in an array of strings. Each of these expand on the theory and show more complexity as the article progresses.
</p>]]></description>
      <pubDate>Thu, 04 Aug 2011 11:28:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog: You don't need a service layer: Fat controllers are okay]]></title>
      <guid>http://www.phpdeveloper.org/news/16369</guid>
      <link>http://www.phpdeveloper.org/news/16369</link>
      <description><![CDATA[<p>
<i>Jani Hartikainen</i> has a new post to his blog today about why, in your framework-based applications, it's <a href="http://codeutopia.net/blog/2011/05/22/you-dont-need-a-service-layer-fat-controllers-are-okay/">okay to have "fat controllers"</a> instead of a service layer.
</p>
<blockquote>
Here's a counterpoint to the currently popular view of "fat controllers are bad", and the current fad of everyone and their cousin implementing service layers: You don't need one. Fat controllers are okay too.
</blockquote>
<p>
He starts by explaining the "why you don't need a service layer" part, mentioning that keeping it in the controller keeps things simple and keeps your code from having to go through extra hoops just to work correctly. He also points out that, just because he recommends "fat controllers" doesn't mean he's advocating code reuse. In fact, just the opposite:
</p>
<blockquote>
It's fine if you code your things in the controllers, but there comes a point when you should stop that. The moment you realize you're duplicating your code, stop and refactor. This is one of the very basics of software engineering: Avoid duplication by creating functions and classes.
</blockquote>]]></description>
      <pubDate>Mon, 23 May 2011 08:42:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: CRAP in PHPUnit 3.5]]></title>
      <guid>http://www.phpdeveloper.org/news/13824</guid>
      <link>http://www.phpdeveloper.org/news/13824</link>
      <description><![CDATA[<p>
As <i>Sebastian Bergmann</i> mentions in his <a href="http://sebastian-bergmann.de/archives/877-CRAP-in-PHPUnit-3.5.html">latest post</a>, he's changed up how the code coverage functionality is handled in <a href="http://phpunit.de">PHPUnit</a> so that he can add something new - CRAP.
</p>
<blockquote>
PHP_CodeCoverage is a component that provides collection, processing, and rendering functionality for PHP code coverage information. [...] Having all code that deals with code coverage in a separate component allows for easier development and better testing. The first result of these improved development conditions is a small new feature that I recently implemented, the support for the CRAP metric.
</blockquote>
<p>
Your code's <a href="http://www.crap4j.org/">CRAP</a> (Change Risk Analysis and Predictions) scoring combines the idea of <a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity">cyclomatic complexity</a> and code coverage statistics to try to guess at how difficult any given piece of code would be to maintain. You can <a href="http://sebastian-bergmann.de/uploads/crap.png">see an example here</a> - the lower the number the better.
</p>]]></description>
      <pubDate>Tue, 12 Jan 2010 11:14:03 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPImpact Blog: Zend Framework: The Cost of Flexibility is Complexity]]></title>
      <guid>http://www.phpdeveloper.org/news/11997</guid>
      <link>http://www.phpdeveloper.org/news/11997</link>
      <description><![CDATA[<p>
Sometimes power comes at a price - you get benefits from the added features and functionality, but you can lose something else along the way - the simplicity that brought you in originally. <i>Federico Cargnelutti</i> <a href="http://phpimpact.wordpress.com/2009/02/22/zend-framework-the-cost-of-flexibility-is-complexity/">takes a look at</a> a tool that can do just that - the <a href="http://framework.zend.com">Zend Framework</a>.
</p>
<blockquote>
Don't assume that just because you're using an object-oriented framework you are writing reusable and maintainable code. You are just structuring your spaghetti code. [...] The main problem with flexibility is that most developers give up trying to understand. I don't blame them, no one likes dealing with complexity
</blockquote>
<p>
TO illustrate, he gives two code snippets from two example developers - Developer A makes full use of the framework and takes a more compact approach to the problem while Developer B adds in a bit more checking and takes a different path to the same (basic) end result.
</p>]]></description>
      <pubDate>Mon, 23 Feb 2009 07:51:51 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Mischook's Blog: Podcast: Structuring PHP Projects]]></title>
      <guid>http://www.phpdeveloper.org/news/11386</guid>
      <link>http://www.phpdeveloper.org/news/11386</link>
      <description><![CDATA[<p>
<i>Stefan Mischook</i> has posted <a href="http://www.killerphp.com/articles/podcast-structuring-php-projects/">a new podcast</a> that gives an overview of things to consider when structuring your application.
</p>
<blockquote>
In the following podcast I go over the key factor when determining how to structure a PHP project. In a nutshell, it comes down to the size and complexity of the job. For the details, listen to me yap.
</blockquote>
<p>
You can download the mp3 <a href="http://www.killerphp.com/articles/wp-content/uploads/2008/11/php-podcast-project-structure.mp3">directly from his site</a>. For more great PHP tutorials, check out his <a href="http://www.killerphp.com/articles/category/php-videos/">videos section</a>.
</p>]]></description>
      <pubDate>Tue, 11 Nov 2008 10:25:52 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: Magento book review found]]></title>
      <guid>http://www.phpdeveloper.org/news/10393</guid>
      <link>http://www.phpdeveloper.org/news/10393</link>
      <description><![CDATA[<p>
In response to <a href="http://www.htmlist.com/development/book-review-phparchitects-guide-to-programming-magento/">another blogger's review</a> of the php|architect "Guide to Programming with Magento", <i>Michael Kimsal</i> has <a href="http://michaelkimsal.com/blog/magento-book-review-found/">posted some clarifications</a>.
</p>
<blockquote>
Starting off with "However, I'm not really the type of person to give accolades unless something is absolutely stellar. As such, this post will primarily be about the shortcomings of the book" I wasn't particularly surprised that there was more of a focus on negatives rather than positives.
</blockquote>
<p>
<i>Michael</i> mentions three topics - the "first to market" point the reviewer makes about different versions of Magento between the book being authored and the release, some of the missing information the reviewer would've liked to see and the complexity of the example module that the reviewer complains is too hard to follow.
</p>]]></description>
      <pubDate>Wed, 11 Jun 2008 14:36:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Debuggable Blog: Programming Psychology - Return home early]]></title>
      <guid>http://www.phpdeveloper.org/news/10058</guid>
      <link>http://www.phpdeveloper.org/news/10058</link>
      <description><![CDATA[<i>Felix Geisendorfer</i> is taking an interesting approach to defining programming in <a href="http://www.debuggable.com/posts/return-home-early-a-programmers-mind:4811de9f-ae28-49c2-a7dc-2f154834cda3">this new post</a> to the Debuggable blog - he's coming at it more from the level of the perception the programmer has about writing good code.
</p>
<blockquote>
I believe understanding the patterns in your own thinking will by far make the biggest impact on how good you will get as a programmer. Forget design patterns, forget unit testing, forget all those functions you know. Important is to question why they exist and how they could be improved.
</blockquote>
<p>
He illustrates through <a href="http://www.debuggable.com/posts/return-home-early-a-programmers-mind:4811de9f-ae28-49c2-a7dc-2f154834cda3">a few examples</a> what he means. He describes one such thought method, the "return home early" process - basically, if something looks too complex for its own good, it probably is. He offers a different way of thinking about it too, a more visual way that can help simplify things even more by laying out the pieces and seeing where they all fit.
</p>]]></description>
      <pubDate>Mon, 28 Apr 2008 14:36:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jacob Santos' Blog: What is your C.R.A.P. Index?]]></title>
      <guid>http://www.phpdeveloper.org/news/8406</guid>
      <link>http://www.phpdeveloper.org/news/8406</link>
      <description><![CDATA[<p>
In relation to a <a href="http://www.phpdeveloper.org/news/8388">recent announcement</a> from <i>Sebastian Bergmann</i> about the inclusion of Cyclometic Complexity testing in the upcoming <a href="http://www.phpunit.de">PHPUnit release</a>, <i>Jacob Santos</i> has <a href="http://www.santosj.name/programming/php-related/php/what-is-your-crap-index/">taken a look at its use</a> - find the <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=210575">C.R.A.P.</a> of a process.
</p>
<blockquote>
The Change Risk Analysis and Predictions (CRAP) index is to give some idea how difficult it would be to maintain the code base. It is not to be used in evaluating how "beautiful" the code is.
</blockquote>
<p>
He had to modify things slightly in PHPUnit to get it to work with entire files/functions, but it was still simple to use the testing software to create each file's CRAP index. For his examples, he chose the WordPress code and includes the code he used for the tests - two functions: getCCLevel and getCrapIndex. The results of the report are <a href="http://www.santosj.name/programming/php-related/php/what-is-your-crap-index/">also included</a>.
</p>]]></description>
      <pubDate>Tue, 07 Aug 2007 11:57:00 -0500</pubDate>
    </item>
  </channel>
</rss>
